Telegram bot subscriber
Before you start
Select a connected bot and a subscriber who has started a chat. Copy the context returned for that subscriber.
Required. Send the account API key in the X-API-Key header. Never expose the key in a public browser or git repository.
- GET /api/v2/telegram-bots then /subscribers.
- Send the full conversationContext with channel=telegram_bot.
- For images use a public HTTPS attachment.publicUrl.
cURL
curl --request POST 'https://raselsms.com/api/v2/messages/send' \ -H "X-API-Key: $RASEL_API_KEY" \ -H 'Content-Type: application/json' \ --data-binary @- <<'RASEL_JSON'{ "to": "123456789", "channel": "telegram_bot", "messageType": "free_text", "content": { "text": "Hello from the bot" }, "conversationContext": { "moduleType": "telegram_bot", "accountId": "6800abc123def4567890fedc", "chatId": "123456789" }}RASEL_JSONTest locally with a mock response first. Confirm the recipient and cost before sending a live request.