Response Codes and Data
When interacting with the HelloSMS API, it's important to understand how to interpret the responses you receive. This page presents the standard response codes and data structures you'll encounter, helping you effectively handle both successful operations and potential errors.
Response Codes
The HelloSMS API uses standard HTTP status codes to communicate the outcome of your requests. These codes provide immediate feedback about whether your request was successful, encountered an error, or requires additional action. Here are the common status codes you'll encounter:
Status Code | Description |
---|---|
200 OK | The request was successful and the expected data was returned. |
400 Bad Request | The request could not be processed due to invalid syntax or missing parameters. Check the statusText field in the response for specific details about the error. |
401 Not Authorized | Authentication failed. This typically occurs due to invalid credentials, an expired access token, or a deactivated account. |
API Response Data
All API responses include a JSON object containing standard fields that provide information about the request outcome, regardless of the specific endpoint called. Here are the fields you'll always receive:
Field | Description |
---|---|
status | Indicates the overall outcome of the request: • "success" - The call completed successfully• "failed" - The call encountered an error |
statusText | A human-readable message providing additional context about the request outcome. This field contains either: • Success information for completed requests • Error details explaining why a request failed |