Telegram Bot Setup REST API

Telegram Bot Setup REST API for SMSGatewayCenter APIs

Telegram Bot Setup REST API

Use the Bot Setup REST API to connect or update your Telegram bot over HTTP: save bot credentials, register the inbound webhook, and get the chat deep link used for QR codes. Use GET for get, and POST for save and registerwebhook. Responses are JSON.

The API returns botChatUrl so mobile and third-party apps can generate the same QR code client-side from https://t.me/{botHandle}. There is no server-side QR image endpoint.

 

API Endpoint

https://unify.smsgateway.center/rest/tg/v1/setup

Legacy alias without v1 in the path is also supported: /rest/tg/setup

 

Authentication

Send your account userid and password as parameters, or send your account API key in the apikey request header. Telegram Chat API access must be enabled on your account.

 

Actions

actionMethodDescription
getGETReturn current bot connection status, flags, and botChatUrl for QR. Aliases: empty, list, status.
savePOSTCreate or update the bot, then register the inbound webhook. Aliases: connect, update.
registerwebhookPOSTRe-register the inbound webhook. Aliases: register_webhook, webhook.

 

ParameterRequiredDescriptionExample/Value
Authentication
userid / passwordYes*Account credentials. Not required when using apikey header authentication.YourUsername / **********
outputYesResponse format. Must be json.json
Setup Parameters
actionOptionalDefaults to get.save
botNameFor saveDisplay name (2-100 characters).My Store Support
botHandleOptionalBot username without @ (4-32 letters, numbers, underscore). Used for https://t.me/{handle}.mystorebot
botTokenCreate onlyTelegram bot token (digits:token). Optional on update to keep the existing token.123456789:AA...YOUR_BOT_TOKEN

 

Sample Request - Get Setup Status (cURL)
curl --location 'https://unify.smsgateway.center/rest/tg/v1/setup?userid=YourUsername&password=xxxxx&output=json&action=get'

 

Sample Request - Save / Connect Bot (cURL)
curl --location --request POST 'https://unify.smsgateway.center/rest/tg/v1/setup?userid=YourUsername&password=xxxxx&output=json&action=save' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'botName=My Store Support' \
--data-urlencode 'botHandle=mystorebot' \
--data-urlencode 'botToken=123456789:AA...YOUR_BOT_TOKEN'

 

Sample Request - Register Webhook with API Key (cURL)
curl --location --request POST 'https://unify.smsgateway.center/rest/tg/v1/setup?output=json&action=registerwebhook' \
--header 'apikey: YOUR_API_KEY'

 

Sample Success Response (save)
{
    "status": "success",
    "setup": {
        "isConfigured": true,
        "isActive": true,
        "formMode": "update",
        "botName": "My Store Support",
        "botHandle": "mystorebot",
        "botChatUrl": "https://t.me/mystorebot",
        "hasBotToken": true,
        "tps": 10,
        "canRegisterWebhook": true,
        "uiSendingEnabled": true,
        "apiAccessEnabled": true,
        "maxAgents": 5,
        "saved": true,
        "webhook": {
            "status": "success",
            "message": "Webhook registered successfully."
        }
    },
    "statusCode": "200",
    "reason": "Your Telegram bot has been connected and the webhook registered."
}

 

Sample Error Response
{
    "status": "error",
    "setup": [],
    "statusCode": "403",
    "reason": "Telegram API access is not enabled for this account."
}

Testimonials

Why do Great Businesses Trust SMS Gateway Center?

K

Kurlon IT

2022-08-04

We have tied up with other SMS providers also, but SMS GatewayCenter is quite good. Good Service from the team. We are very happy with the service be it accounts related or technical issue. We always get good response.

I

INOX Air Products

2018-02-09

We have an excellent experience with SMS Gateway Center. The services and support has been of very high standard.

S

Shalabh Arora

2025-04-11

I’ve been using SMSGatewayCenter’s bulk SMS and WhatsApp services since early 2022 for my small business, and the experience has been fantastic. The platform is intuitive, and the message delivery is incredibly reliable, reaching my customers without fail. The 24/7 support team is quick to assist, and the cost-effectiveness is a big plus. It’s transformed how I connect with my audience, and I highly recommend it to other entrepreneurs! (Google Revirews)

R

Reflex

2025-04-11

We’ve been using your bulk SMS services for a few months, and the results have been phenomenal. The open rates and customer engagement have gone through the roof. Highly recommend for any business looking to scale fast! (Google Revirews)

V

Vedanth Gowda

2025-04-18

I’m Vedanth Gowda, leading a finance business, and I’ve been leveraging SMSGatewayCenter’s bulk SMS and WhatsApp tools —absolutely transformative! The platform’s speed and precision in delivering financial alerts to my clients are unmatched, giving me a competitive edge. Samrat’s expertise in tailoring notification workflows for market updates was a standout, and the robust security features instilled trust. The affordable pricing and proactive support team make it a no-brainer. Perfect for finance pros aiming to elevate client trust and efficiency! (Google Revirews)

N

Naval Bhatnagar

2025-04-12

From day one, the team at SMS GATEWAY CENTER guided us through setup, testing, and launching campaigns. Their support is A+. Whether you’re new to SMS marketing or experienced, they make it smooth. Thank you Aakash. (Google Revirews)


CTA for Unlock Real-Time Messaging – Integrate Today!

Unlock Real-Time Messaging – Integrate Today!

Try Our API in a Sandbox Environment Before Going Live!

Join Thousands of Developers – Try Our API Now!

Get in touchSign up