Channels

Create a Telegram publisher connection

POST
/api/projects/{projectId}/channels/{channelId}/publisher/telegram/connect

Authorization

sessionCookie
cookiebetter-auth.session_token<token>

The Better Auth email/password session cookie used by the web application.

Path Parameters

projectId*string
Length1 <= length
channelId*string
Length1 <= length

Request Body

  1. body
botToken*string
Length1 <= length <= 512
chatReference*string
Length1 <= length <= 128

Response Body

Response for status 200

application/json
  1. response
connection*
Example Request
curl -X POST 'https://postbot.example/api/projects/string/channels/string/publisher/telegram/connect' \
  -H 'Content-Type: application/json' \
  -d '{
  "botToken": "string",
  "chatReference": "string"
}'
Example Response
{
  "connection": {
    "id": "string",
    "projectId": "string",
    "publisherId": "string",
    "channelId": "string",
    "kind": "string",
    "credentialId": "string",
    "endpointUrl": "string",
    "destination": {
      "type": "account",
      "id": "string",
      "name": "string"
    },
    "authentication": {
      "kind": "none"
    },
    "providerId": "string",
    "externalAccountId": "string",
    "externalAccountName": "string",
    "scopes": [
      "string"
    ],
    "state": "active",
    "connectedByActorId": "string",
    "createdAt": 0,
    "updatedAt": 0
  }
}

Was this page helpful?