# Error Codes

This error codes is additional information to explain what happened when some errors occured. The following table describe the code which may appear when working with OCA SMS API Gateway. If an error is not listed in the table, going back to HTTP status codes above in order to determine the best way to address the issues.

<table><thead><tr><th width="86">Code </th><th width="164">Text</th><th>Description</th></tr></thead><tbody><tr><td><mark style="color:red;">5</mark></td><td>low-balance</td><td>Indicationg that your account has no enough balance left</td></tr><tr><td><mark style="color:red;">9</mark></td><td>Too Many Request Code</td><td>Due to the api rate limit, you have to wait until the currently window wxpires, the default api rate limit is in 25 request per seconds. You can check http headers reaponse in order to know the remaining limit of your request.<br><strong>- </strong><mark style="color:red;"><strong>X-RateLimit-limit</strong></mark><strong> :</strong> the rate limit of endpoint<br>- <mark style="color:red;"><strong>X-RateLmit-Remaining</strong></mark> : the number of request left<br>- <mark style="color:red;"><strong>X-RateLimit-Reset</strong></mark> : the remaining window before the rate limit resets</td></tr><tr><td><mark style="color:red;">13</mark></td><td>Internal Error</td><td>Corresponds with HTTP 500.<br>An unknown internal error occured</td></tr><tr><td><mark style="color:red;">19</mark></td><td>Missing Authorization Header</td><td>Corresponds with HTTP 401.<br>It indicates Authorization header is not set properly</td></tr><tr><td><mark style="color:red;">33</mark></td><td>Data doesn't exist</td><td>Corresponds with HTTP 404.<br>The certain data is not found</td></tr><tr><td><mark style="color:red;">39</mark></td><td><em>[object]</em></td><td><p>Corresponds with HTTP 406.<br>There are incorrects or missing parameter in request body, it is like the message_value is not same as the template message<br><br>- <strong>invalid input country code</strong></p><p>Destination of phone number Values : <strong>country code + phone number</strong> </p><p><strong>valid example :</strong> (+6281381475159, 6281381475159)</p></td></tr><tr><td><mark style="color:red;">43</mark></td><td>Auth token is not supplied</td><td>Corresponds with HTTP 401.<br>It indicates Authorization header is not set properly</td></tr><tr><td><mark style="color:red;">45</mark></td><td>Auth token is not valid</td><td>Corresponds with HTTP 401.<br>It indicates Authorization token is not valid</td></tr><tr><td><mark style="color:red;">59</mark></td><td>SMS Template doesn't exist Code</td><td>Corresponds with HTTP 406.<br>Your message template doesn't exist</td></tr></tbody></table>
