Sending a “+” sign in an SMS via SMSGatewayCenter’s API requires proper URL encoding to ensure the character is interpreted correctly. Follow these steps:
URL Encode the “+” Sign: In your SMS Gateway API request, encode the “+” sign as %2B. For example, if you want to send a message like “Contact +919876543210,” encode it as “Contact%2B919876543210” in the msg parameter.
Use Sample Scripts: Refer to our SMS API documentation and sample scripts (e.g., PHP CURL or HTTP requests) to implement URL encoding. In PHP, you can use urlencode():
$message = urlencode("Contact +919876543210");
curl -X POST \
https://unify.smsgateway.center/SMSApi/send \
-H 'apikey: secretkey' \
-H 'cache-control: no-cache' \
-H 'content-type: application/x-www-form-urlencoded' \
-d 'userid=user&password=userpass&senderid=SENDER&sendMethod=quick&msgType=text&mobile=919xxxxxxxxx9&msg=$message&duplicateCheck=true&output=json'
Test the Request: Send a test SMS to verify the “+” sign appears correctly in the message. Ensure your sender ID and recipient number are properly formatted.
If issues persist, check our troubleshooting tips or contact support for assistance.