Invalid Host IP Error when sending an SMS

482 views Asked by At

I have been trying to send an SMS using the PHP ideamart wrapper and I am getting the following error.

Invalid Host IP Error

This is the request I made to https://api.dialog.lk/sms/send

{ "message": "Hello", "destinationAddresses": ["tel:94777123456"], "password": "password", "applicationId": "APP_999999" }

Can anyone help me to figure out the reason?

2

There are 2 answers

0
Fawzan On BEST ANSWER

After a couple of tries I figured out the cause of the issue, It is a problem with my web hosting service. Since Ideamart API only allow requests from whitelisted/allowed IP address.

I have requested the outgoing IP from the hosting provider and added it to the provisioning. Now it works fine.

0
user2473015 On

Ideamart API only allows whitelisted IP for a apps when you provisioned. So first get your host's IP address and use it as a whitelisted IP.

Since app is already provisioned you need to send support request to ideamart to alter it.