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

codeScenario
UNAUTHORIZEDThe API Key is invalid or has been revoked
VALIDATION_ERRORIncorrect parameters; data contains the specific fields
NOT_FOUNDThe resource does not exist (including resources that do not belong to you)
PLAN_LIMIT_REACHEDExceeded your plan's product count, knowledge base capacity, or number of seats
CONVERSATION_CLOSEDThe conversation has ended; please start a new one
CONVERSATION_OPENThe conversation has not ended yet, so it cannot be rated
RATE_LIMITEDToo many requests
USER_TOKEN_INVALIDThe user_token signature is incorrect or has expired
CHECKOUT_FAILEDThe order confirmation has expired, or the checkout API is temporarily unreachable (when the user clicks "Confirm order" in the widget)
ORIGIN_NOT_ALLOWEDThe current website is not on the list of allowed embed origins
LANGUAGE_NOT_SUPPORTEDThe language is not supported or not enabled
CHANNEL_CHECK_FAILEDThe channel's AppID / AppSecret failed validation; message contains the reason returned by WeChat
CHANNEL_REMOVEDThe 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: