HTTP Status code

最新の更新:2022-12-16

This document defines the HTTP return code specification of the MTPush REST API.

The new version of MTPush Push API v4 meets this specification.

Status code definition

Code describe explicate
200 OK Success!
400 Bad request The request is invalid. The corresponding description will explain the reason.
401 Not verified No verification information or verification failed
403 Rejected The request was understood but not accepted. The corresponding description will explain the reason.
404 not found The resource does not exist, the requested user does not exist, and the requested format is not supported.
405 The request method is inappropriate The interface does not support the request for this method.
410 Offline The requested resource is offline. Please refer to the relevant announcement.
429 Too many requests The request exceeded the frequency limit. The corresponding description will explain the specific reason.
500 Internal service error An internal error occurred on the server. Please contact us to solve the problem as soon as possible.
502 Invalid proxy The service server is offline or being upgraded. Please try again later.
503 Temporary service failure The server could not respond to the request. Please try again later.
504 Agent timeout The server is running, but cannot respond to the request. Please try again later.

Specifications to be followed

  • 200 must be correct. Do not use 200 return code for all exceptions
  • For business logic errors, try to use 4xx for special error codes, otherwise use 400.
  • Internal error on the server. If there is no special error code, use 500.
  • When business exceptions occur, the returned content uses JSON format to define error information.
在文档中心打开
icon
営業に連絡する