Help on API response codes¶
in case of a positive result, the response will be 200, 201 or 202.
if the URL is incorrect, the response will be 404.
if not enough rights for the transaction, the response will be 403 or 401.
in case of any errors, the response will be 400 `or ` 500.
in case the maximum number of requests for the period is exceeded, the response will be 503. The current limit - up to 600 requests per minute for the application.
The response of API server is in JSON format. In case of an error, the response of the server will look like this:
HTTP/1.1 401 UNAUTHORIZED Server: nginx/1.2.3 Date: Mon, 17 Sep 2012 10:07:39 GMT Content-Type: application/json; charset=utf-8 Transfer-Encoding: chunked Connection: keep-alive Vary: Authorization, Cookie WWW-Authenticate: Bearer realm="", error="invalid_token", error_description="Token doesn't exist" Content-Language: ru Set-Cookie: section=advertiser; expires=Tue, 17-Sep-2013 13:07:39 GMT; Path=/ {"error_description": "Token doesn't exist", "error_code": 1, "error": "invalid_token"}Transferred data include the name of the error error. They can also include additional information:
error_description - error description
error_code - additional error code
Additional error codes:
Value
Description
0 The token expired
1 Incorrect or invalid token
2 The key has no sufficient access rights for performing the operation
3 Incorrect request
4 The maximum number of requests for the period expired
5 The refresh token is unavailable
6 The maximum number of tokens has been exceeded