When working with the EasySendSMS REST API or HTTP API, it's crucial to address any challenges that arise to ensure continuous functionality. Below are detailed steps and considerations to assist you in troubleshooting potential issues that may disrupt your API integration.
Ensure that your HTTP request is properly authenticated using the correct API key or, for the legacy HTTP API, the correct username and password. Authentication issues are a common source of problems. Double-check that your credentials are correctly formatted and have not expired. If you're using the API key, make sure it is included in the request headers as specified in the API documentation.
Double-check that the IP address from which your API request is originating is correctly configured and whitelisted in your EasySendSMS account settings. If you have enabled IP whitelisting for added security, ensure that the IP address making the request matches one of the IPs listed in the "Whitelisted IP Addresses" section of your account. Requests from non-whitelisted IP addresses will be blocked, leading to authentication failures. It's also important to verify that your network's outbound IP address has not changed unexpectedly, as this could cause your requests to be rejected.
When an error occurs, the API will return an error code. You can refer to the EasySendSMS error code tables for both the HTTP API and the REST API to understand the specific issue indicated by the error code, whether it's related to missing parameters, invalid credentials, or service availability. By following the troubleshooting steps provided for each error code, you can effectively resolve the issue.
Make sure that all required parameters are included in your API request. Missing parameters are a common cause of API errors. Review the API documentation to confirm that you're providing all the necessary information. This includes mandatory fields like the destination number, message content, and any other parameters specified as required for the API endpoint you're using.
If you're utilizing one of the EasySendSMS SDKs, ensure that all the required dependencies are installed and properly configured. Missing or outdated dependencies can cause the SDK to malfunction, leading to errors in your API calls. Verify that your development environment meets the SDK's requirements and that all libraries are correctly referenced in your project.
If your API requests include a callback URL, confirm that it is correctly configured and accessible. The callback URL is where the API sends status updates or responses, so it must be operational and capable of receiving HTTP requests. Check for issues such as incorrect URL formatting, network restrictions, or server-side errors that might prevent the callback from functioning properly.
During testing, ensure that the phone numbers you are using are valid, active, and capable of receiving messages. Invalid or inactive numbers can cause the API to return errors or fail to deliver messages. Additionally, testing with real, live numbers in different regions can help you confirm that the API is functioning as expected across various networks and locations.