Format de réponse de l’API 2022-07-26

Overview

An HTTP code of 200 is responded for each successful data requests. If there is any error exists, an HTTP code other than 200 will be given as well as platform Error Code and error description.

Success

A valid request made using current credentials will return a 200 response. The body of the response will be a JSON file starting as follows:

{
 "result": "success",
 "server_time": "2017-10-09T08:48:34Z",
 ......
}

Failure

An invalid request or a request that cannot be authenticated will result in returning an error code (4XX or 5XX). The body of the response will give detailed information as in this example:

{
 "result": "error",
 "server_time": "2017-10-09T08:53:18Z",
 "errorCode": "permission_denied_force_log_off",
 "desp": "account_key, or token_id is not correct"
}

Every failed request will include an errorCode and desp field giving more details.

List of Error Codes

Error Code (errorCode)Description
permission_denied_force_log_offYou supplied invalid credentials, or the account details changed recently
missing_dataThe request is missing required data
invalid_formatThe request data is not in the correct format
over_limitYou have exceeded the system limits
error_method_invalidRequest method is invalid
invalid_created_atThe format of created_at field is invalid
invalid_json_formatThe input JSON string format is invalid
invalid_channel_idInvalid channel_id
invalid_api_keyInvalid API Key
invalid_field_valueThe input field value is invalid
invalid_read_keyInvalid read_key value
invalid_timezoneInvalid timezone value
missing_field_dataThe request is missing field data
missing_field_dataThe request is missing field data
request_too_fastToo many simultaneous requests
low_balanceThe account balance is too low
field_length_over_limitThe length of the field string is over the limit
group_name_existThe input group_name also exists in the platform
openid_not_bindedWechat account hasn’t been linked to the platform account.
account_require_verifyAccount is not activated yet
wrong_passwordPassword is incorrect