---
title: "Create an OAuth connect URL"
method: GET
path: "/v1/connect/{platform}"
tags: ["Connect"]
---

# Create an OAuth connect URL

`GET /v1/connect/{platform}`

## Request

- Base URL: `https://api.postzen.dev`
- URL: `https://api.postzen.dev/v1/connect/{platform}`
- Auth: HTTP bearer

Initiates an OAuth connection flow and returns an authorization URL to redirect the user to. The OAuth state expires after 10 minutes. This endpoint requires a read-write API key.

For `bluesky`, the returned `authUrl` is a PostZen-hosted page where the user enters their Bluesky handle and app password (no developer app or OAuth redirect is required); the connection completes when they submit that form.

For `telegram`, the returned `authUrl` is a PostZen-hosted page that issues a short-lived access code (there is no OAuth grant and no Telegram authorization screen); the connection completes when the user adds @PostZenScheduleBot as an administrator of a channel or group and sends that code to the bot.

## Query parameters

- `profileId` string, required
- `redirectUrl` string, uri

## Response `200`

OAuth URL created.

- ConnectStartResponse
  - `authUrl` string, uri, required: URL to redirect the user to for platform authorization.
  - `state` string, required: OAuth state parameter generated by PostZen.

## Other responses

- `400`: Invalid request.
- `401`: Missing or invalid API key.
- `402`: A plan limit, missing payment method, or paused account prevents the requested operation.
- `403`: The API key does not have sufficient permission or profile access.
- `404`: Resource not found.
- `500`: Unexpected server error.

---

[API](https://skmtc.dev/postzen/apis/postzen-public-api.md) · [All operations](https://skmtc.dev/postzen/apis/postzen-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/postzen/apis/postzen-public-api/revisions/40863e3710ec?raw)
