SynqDocs
Management APITelegram groups

Read a Telegram group's bot, and where it could move

The bot that serves the group now, and each bot it could move to in place (`POST …/bot`): the brand's own (the brand's, else the org's, `GET …/brands/{brand}/own-bots`) while Synq's serves it, and Synq's while an own bot does. Each says whether it's in the group, the rights it lacks there of those Synq uses (Invite users via link, Ban users, Pin messages), and Telegram's link that adds it as an admin with them. Read from Telegram now. Needs `org.integrations.view`, and an API with a Telegram bot (409 `telegram_unavailable`).

GET/v1/orgs/{org}/telegram-groups/{group}/bot

The bot that serves the group now, and each bot it could move to in place (POST …/bot): the brand's own (the brand's, else the org's, GET …/brands/{brand}/own-bots) while Synq's serves it, and Synq's while an own bot does. Each says whether it's in the group, the rights it lacks there of those Synq uses (Invite users via link, Ban users, Pin messages), and Telegram's link that adds it as an admin with them. Read from Telegram now. Needs org.integrations.view, and an API with a Telegram bot (409 telegram_unavailable).

Authorization

bearer
AuthorizationBearer <token>

An org API key (sk_live_…, sk_test_…), or an access token from the Synq issuer (the synq brand, on the accounts host) for this API.

In: header

Path Parameters

org*string

The org's id

Match^org_[0-9a-hjkmnp-tv-z]{26}$
group*string

The Telegram group's id

Match^tgg_[0-9a-hjkmnp-tv-z]{26}$

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X GET "https://api.synq.build/v1/orgs/org_01h455vb4pex5vsknk084sn02q/telegram-groups/tgg_01h455vb4pex5vsknk084sn02q/bot" \  -H "Authorization: Bearer $SYNQ_API_KEY"
{  "current": {    "own_bot_id": "string",    "id": "7100000002",    "name": "RODAI",    "username": "RodaiGateBot"  },  "options": [    {      "to": "own",      "bot": {        "own_bot_id": "string",        "id": "7100000002",        "name": "RODAI",        "username": "RodaiGateBot"      },      "in_group": true,      "missing": [        "invite_users"      ],      "ready": true,      "add_link": "https://t.me/RodaiGateBot?startgroup=tgg_01h455vb4pex5vsknk084sn02q&admin=invite_users+restrict_members+pin_messages"    }  ]}