API methods
First of all, get API key to insert in all requests.
Table of content
Get bot user
Get information about user.
GET https://app.tgtaps.com/api/bot-users/external/bot-user?apiKey=API_KEY&botId=BOT_ID&userTelegramId=TELEGRAM_ID
Example response:
{
"tgId": 165299325,
"createdAt": "2025-01-31T15:08:08.13319Z",
"registeredByRefCode": null,
"tgUsername": "rostislav_dugin",
"tgName": "Rostislav Dugin",
"points": 246889,
"maxEnergy": 1000,
"customValue": 0,
"autominePointsPerHour": 0,
"tonFriendlyAddress": "",
"level": 2,
"lastIp": null
}
Get bot user friends
Get friends of the user.
GET https://app.tgtaps.com/api/bot-users/external/bot-user-friends?botId=BOT_ID&apiKey=API_KEY&userTelegramId=TELEGRAM_ID
Example response:
[
{
"tgId": 671934272,
"createdAt": "2025-02-02T20:07:55.92733Z",
"registeredByRefCode": "9acc329d-4cab-40f6-9801-746cc4773fda",
"tgUsername": "username",
"tgName": "User Name",
"points": 0,
"maxEnergy": 1000,
"customValue": 0,
"autominePointsPerHour": 0,
"tonFriendlyAddress": "",
"level": 0,
"lastIp": null
}
]
Send message
Send message via bot to the user.
POST https://app.tgtaps.com/api/bot-users/external/send-message
Example request body:
```json
{
"botId": "BOT_ID",
"apiKey": "API_KEY",
"userTelegramId": "TELEGRAM_ID",
"message": "<b>Hello</b> world",
"isEnableHtml": true
}
```
You can use HTML tags to format your message.
Increase points
Increase points of the user.
GET https://app.tgtaps.com/api/bot-users/external/increase-points?botId=BOT_ID&apiKey=API_KEY&userTelegramId=TELEGRAM_ID&points=AMOUNT
Something unclear in docs or you know how to improve article? Message us in community! We will answer you and then promise to improve the article within 3 days.
Last updated