Errors

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

CodeMessage
101SenderId too long
102Incorrect number of pulls
103Pull number is not in the range
104Content cannot be empty
105Batch length exceeds 128 character limit
106Text message length exceeds 3000 character limit
107Wrong format of phone number
108Wrong phone number
109Account length exceeds 50 digits
110Account cannot be empty
301Account does not exist
302Password wrong
303Client IP error
304Account deleted or disabled
305Account balance is insufficient
401MessageId error
501Upper limit daily transmission
502Upper limit monthly transmission
503Exceeded sending limit
504Exceeded counter-complaint limit
505Messages don't match
506Product price configuration error
507Message charge error
508Product configuration error
509Introduction or verification code cannot be empty
510Upper limit of anti complaint
511Forbid country
900Universal error code(In general, our supplier returns a failure)