HydraCore
API by router

Telegram channel

GET
/v1/instances/{instance_id}/channels/telegram

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

instance_id*Instance Id

Header Parameters

X-Api-Key?string|null

Response Body

Successful Response

application/json
  1. response

Current Telegram channel status.

bot_username?string|null
has_bot_token*Has Bot Token
telegram_enabled*Telegram Enabled
webhook_url?string|null
Example Request
curl -X GET 'https://example.com/v1/instances/string/channels/telegram'
Example Response
{  "bot_username": "string",  "has_bot_token": true,  "telegram_enabled": true,  "webhook_url": "string"}

Setup Telegram Channel

POST
/v1/instances/{instance_id}/channels/telegram

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

instance_id*Instance Id

Header Parameters

X-Api-Key?string|null

Request Body

application/json
  1. body

Request to configure Telegram channel for an instance.

bot_token*Bot Token
Length30 <= length <= 100

Response Body

Successful Response

application/json
  1. response

Response after configuring Telegram channel.

instance_id*Instance Id
message*Message
telegram_enabled*Telegram Enabled
webhook_registered?Webhook Registered
Defaultfalse
webhook_url?string|null
Example Request
curl -X POST 'https://example.com/v1/instances/string/channels/telegram' \  -H 'Content-Type: application/json' \  -d '{  "bot_token": "stringstringstringstringstring"}'
Example Response
{  "instance_id": "string",  "message": "string",  "telegram_enabled": true,  "webhook_registered": false,  "webhook_url": "string"}

Remove Telegram Channel

DELETE
/v1/instances/{instance_id}/channels/telegram

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

instance_id*Instance Id

Header Parameters

X-Api-Key?string|null

Response Body

Successful Response

application/json
  1. response

Response after configuring Telegram channel.

instance_id*Instance Id
message*Message
telegram_enabled*Telegram Enabled
webhook_registered?Webhook Registered
Defaultfalse
webhook_url?string|null
Example Request
curl -X DELETE 'https://example.com/v1/instances/string/channels/telegram'
Example Response
{  "instance_id": "string",  "message": "string",  "telegram_enabled": true,  "webhook_registered": false,  "webhook_url": "string"}