Connect a channel
Connects a Telegram or Instagram channel to a robot. Other channel types are connected in the ParsChat panel.
Channels you hold credentials for, such as Telegram, connect immediately. Pass the credential in config and the response is a live channel with is_active: true.
Instagram is different. Meta requires the page owner to authorise in their own browser, so nothing is connected yet: the response is a pending channel carrying an authorisation_url. Send the page owner there. The channel becomes active only when they finish, and holds no capacity until then. Configure your return URL with us before the first connection, or the page owner’s browser lands on a ParsChat screen instead of yours.
A robot holds at most one channel per type. An open Instagram handshake blocks a second one with 409 until it expires; once it has expired, retrying returns 410 and you start again.
A Telegram bot can be connected to one robot at a time; connecting a bot that is already connected elsewhere returns 409. Reconnecting a bot you disconnected from the same robot brings the channel back with its conversation history.
Authentication
Your API key, issued by ParsChat sales. One key per account, spanning every robot you own. Send it as Authorization: Bearer pk_live_….
Path parameters
Request
The channel type to connect. Telegram and Instagram can be connected over the API; other channel types are connected in the ParsChat panel and then appear in your channel lists.
Credentials for channels you hold the credentials for, such as a Telegram bot token. Instagram takes no config: the page owner authorises in their own browser instead.
Response
The channel was created. What you get back depends on the type: a live channel for one you hold credentials for, or a pending handshake for Instagram.