Introduction
SafeW API is a set of HTTP interfaces that allow developers to create and manage chatbots. With this API, you can:
- Send and receive text, images, videos, audio, files and other message types
- Receive message updates via long polling
API Modules
| Module | Description | Authentication |
|---|---|---|
| Bot API | Core bot interface | Bot Token |
Basic Concepts
Bot Token
Each bot has a unique Token for API authentication. The Token is a string obtained when creating the bot.
Request Format
All API requests are sent via HTTP, supporting JSON and multipart/form-data formats. The Token is included in the URL path for authentication.
Response Format
All Bot API responses are in JSON format:
json
{
"ok": true,
"result": { }
}Error response:
json
{
"ok": false,
"error_code": 400,
"description": "Bad Request: chat not found"
}