Open API Overview
Authentication methods, response formats, error codes, and supported language codes.
Below, {API} refers to the service address, which you can find on the "Integration" page in the dashboard.
All requests include Authorization: Bearer sk_live_... (created on the "Integration" page in the dashboard; it is shown only once, so keep it on your server only).
Responses always follow the format {"code": "SUCCESS", "message": "", "data": ...}. On failure, code is a stable error code — use it to determine what went wrong; message is for humans only. All amounts are strings.
Error codes
| code | Scenario |
|---|---|
UNAUTHORIZED | The API Key is invalid or has been revoked |
VALIDATION_ERROR | Incorrect parameters; data contains the specific fields |
NOT_FOUND | The resource does not exist (including resources that do not belong to you) |
PLAN_LIMIT_REACHED | Exceeded your plan's product count, knowledge base capacity, or number of seats |
CONVERSATION_CLOSED | The conversation has ended; please start a new one |
CONVERSATION_OPEN | The conversation has not ended yet, so it cannot be rated |
RATE_LIMITED | Too many requests |
USER_TOKEN_INVALID | The user_token signature is incorrect or has expired |
CHECKOUT_FAILED | The order confirmation has expired, or the checkout API is temporarily unreachable (when the user clicks "Confirm order" in the widget) |
ORIGIN_NOT_ALLOWED | The current website is not on the list of allowed embed origins |
LANGUAGE_NOT_SUPPORTED | The language is not supported or not enabled |
CHANNEL_CHECK_FAILED | The channel's AppID / AppSecret failed validation; message contains the reason returned by WeChat |
CHANNEL_REMOVED | The channel the conversation came from has been deleted, so replies cannot be sent |
Supported language codes: zh-CN, zh-TW, en, ja, ko, de, fr, es, pt, it, ru, ar, th, vi, id, ms, tr, nl, pl. Values such as zh-Hant, pt-BR, and en_US are automatically converted to the corresponding code.
Was this page helpful?
Last updated:
