Error Response
Authentication
A request is successfully accepted with an HTTP status code of 2xx. Otherwise, it indicates that something goes wrong with an HTTP status code of 4xx or 5xx.
A structured response body is returned when errors occur, here is an example of the response body for errors:
{
"timestamp": 1711419544019,
"status": 401,
"error": "Unauthorized",
"message": "Invalid API Key"
"path": "/v1/sms/send/single"
}
After Pass Authentication
A message submit is successfully with a code of 0. Otherwise, it's a failure.
A structured response body is returned when errors occur, here is an example of the response body for errors:
{
"code": "305",
"message": "Account balance is insufficient",
"data": null
}
Error Object
code
REQUIRED. YONI-TECH defines the error code.
message
A human-readable representation of the error. It is intended as an aid to developers and is not suitable for exposure to end users.
data
Always null
Code List
Code | Message |
---|---|
101 | SenderId too long |
102 | Incorrect number of pulls |
103 | Pull number is not in the range |
104 | Content cannot be empty |
105 | Batch length exceeds 128 character limit |
106 | Text message length exceeds 3000 character limit |
107 | Wrong format of phone number |
108 | Wrong phone number |
109 | Account length exceeds 50 digits |
110 | Account cannot be empty |
301 | Account does not exist |
302 | Password wrong |
303 | Client IP error |
304 | Account deleted or disabled |
305 | Account balance is insufficient |
401 | MessageId error |
501 | Upper limit daily transmission |
502 | Upper limit monthly transmission |
503 | Exceeded sending limit |
504 | Exceeded counter-complaint limit |
505 | Messages don't match |
506 | Product price configuration error |
507 | Message charge error |
508 | Product configuration error |
509 | Introduction or verification code cannot be empty |
510 | Upper limit of anti complaint |
511 | Forbid country |
900 | Universal error code(In general, our supplier returns a failure) |