Sorry, you need to enable JavaScript to visit this website.

You are here

Invalid "from" address specified

2 posts / 0 new
Last post

Ian's picture
by Ian

Invalid "from" address specified
Hi. I'm trying to send a single SMS using the PHP SDK and Restlet for Chrome on the free tier. Both are returning the same error. The request is simple and it containes the correct Authorization header and Content-Type. Body: { "to":"04xxxxxxxx", "body":"Test Message"} Response: { "status":"400", "code":"DELIVERY-IMPOSSIBLE", "message":"Invalid \'from\' address specified" } According to the docs the "from" address can be omitted:  https://github.com/telstra/MessagingAPI-SDK-php/blob/master/docs/Model/SendSMSRequest.md  Is there anything else I need to do to get this working?

DeveloperSteve's picture
by DeveloperSteve

Hi imclean

Heres what i use in my php sample code scripts, planning to publish these with the SDKs for next release

$arr = array('to' => '0400000000', 'body' => 'hello world');

$payload = new \Telstra_Messaging\Model\SendSMSRequest($arr);

$result = $apiInstance->sendSMS($payload);

Have you done a provisioning call to get a number assigned?

Log in or register to post comments