Skip to content

Loading Bot Users

Endpoints to upload and sync end-user data from telegram and viber bots directly to your organization.

1. Telegram Bot Endpoint

Endpoint: https://restapi.smsbat.com/api/tg_bot/{token} Method: POST

Path Parameters: - token (string, required): The unique token for the Telegram Bot. Must be included as part of the URL path.

Request Body:

{
  "id": 0,
  "firstName": "string",
  "lastName": "string",
  "userName": "string",
  "phone": "string",
  "languageCode": "string"
}

Field Descriptions: - id (integer): Unique user identifier in the Telegram bot. - firstName (string, optional): User's first name. - lastName (string, optional): User's last name. - userName (string): User's Telegram username. - phone (string, optional): User's phone number. - languageCode (string, optional): User's active language code.


2. Viber Bot Endpoint

Endpoint: https://restapi.smsbat.com/api/viber_bot/{token} Method: POST

Path Parameters: - token (string, required): The unique token for the Viber Bot. Must be included as part of the URL path.

Request Body:

{
  "id": "string",
  "name": "string",
  "phone": "string",
  "country": "string",
  "language": "string",
  "avatar": "string"
}

Field Descriptions: - id (string): Unique user identifier in the Viber bot. - name (string): User's full name. - phone (string, optional): User's phone number. - country (string, optional): User's country. - language (string, optional): User's active language. - avatar (string, optional): URL to the user's avatar image.