staqlydocs
REST APIAPI referenceChannels

Whether the chat for a Telegram connect code is connected yet

Whether the chat for a Telegram connect code is connected yet (channels:read)

Every request sends Authorization: Bearer ...: the access token in local mode, an API key stk_... in cloud mode. Use Send to try it against your cloud instance with your API key.

GET
/v1/channels/telegram/connect/{code}

Authorization

headerAuthorizationBearer <token>

API key (stk_...), or in the Community Edition the access token (stk_local_...)

Path Parameters

code*string

Response Body

OK

application/json
  1. response

A code to connect a Telegram chat through the server's bot, and what became of it

code*string
command*string

What to send in the chat: /connect@bot CODE (addressed to the server's bot, so other bots leave it alone)

bot*string

The bot to add (@username)

expires_at*string
Formatdate-time
status*string

waiting: no /connect yet, or the last one failed (error says why)

Value in"waiting""connected""expired"
channel_id?string
error?string
Example Request
curl -X GET 'https://staqly.example.com/v1/channels/telegram/connect/string'
Example Response
{  "code": "string",  "command": "string",  "bot": "string",  "expires_at": "2019-08-24T14:15:22Z",  "status": "waiting",  "channel_id": "string",  "error": "string"}