---
agent:
  instructions: "Use this search API to find relevant content across this site with keywords or natural-language queries, instead of crawling individual pages. Results are returned in Markdown."
  endpoint: "https://segmentstream.com/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://developers.cloudflare.com/ai-search/how-to/search-for-agents/"
---

# segmentstream connection authorize

Authorize a deployed connection and print its OAuth URL

## Usage

Command syntax

```
segmentstream connection authorize [OPTIONS] CONNECTION_KEY
```

## Options

- `--workspace UUID`

  Override the linked workspace

- `--api-url URL`

  SegmentStream control-plane origin

- `--open`

  Open the authorization URL in your browser

- `--token-file FILE`

  Authorize with an access token read from FILE, or stdin with '-', instead of the provider's consent flow, where the connection admits one (WhatsApp system user tokens, Shopify Admin API access tokens, Vercel and Cloudflare API tokens, Mailchimp API keys)

- `--client-credentials`

  Authorize with the OAuth client credentials grant of the connection's application, instead of the provider's consent flow, where the connection admits it

- `--account ID`

  With --token-file: the provider account the token is for, which the token does not name: a WhatsApp Business account ID, or the Cloudflare account of an account API token

- `--bot-name NAME`

  Telegram: the new bot's suggested name; you can change it in Telegram

- `--bot-username USERNAME`

  Telegram: the new bot's suggested username. Without an ending, a Telegram Premium account gets USERNAME_agent and others USERNAME_bot; defaults to one from the name

- `--no-wait`

  Telegram: print the bot link and return; finish with \`segmentstream telegram-bot wait REQUEST-ID\`

- `--organization ORG-ID`

  Organization for this command

- `--help`

  Show this message and exit.

[Read as Markdown ↗](https://segmentstream.com/docs/cli/connection/authorize.md)
