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

You are here

Messaging API validity and scheduledDelivery return 400 DELIVERY-OUT-OF-RANGE when set to 0

2 posts / 0 new
Last post

James's picture
by James

Messaging API validity and scheduledDelivery return 400 DELIVERY-OUT-OF-RANGE when set to 0
Hi, with the Messaging API send sms call, with 'validity' or 'scheduledDelivery' set to 0, a 400 BAD request 'DELIVERY-OUT-OF-RANGE' is returned. { "to": "+61xxxxxxxxx", "body": "validity0", "from": "+61xxxxxxxxx", "validity": 0, "scheduledDelivery": 1, "notifyURL": "", "replyRequest": false }   or   { "to": "+61xxxxxxxxx", "body": "scheduledDelivery0", "from": "+61xxxxxxxxx", "validity": 1, "scheduledDelivery": 0, "notifyURL": "", "replyRequest": false }   HTTP/1.1 400 Bad Request  
Connection:
keep-alive
Content-Length:
141
Content-Type:
application/json
Date:
Thu, 11 Jan 2018 23:25:35 GMT
Server:
Apigee Router
{ "status": "400", "code": "DELIVERY-OUT-OF-RANGE", "message": "Refer to API docs at https://dev.telstra.com"   When these values are set to 1 (or more), a 201 is returned.   { "to": "+61xxxxxxxxx", "body": "validity and Scheduled Delivery 1", "from": "+61xxxxxxxxx", "validity": 1, "scheduledDelivery": 1, "notifyURL": "", "replyRequest": false }     HTTP/1.1 201 Created
Connection:
keep-alive
Content-Length:
369
Content-Type:
application/json
Date:
Thu, 11 Jan 2018 23:29:36 GMT
Server:
Apache
Strict-Transport-Security:
max-age=15768000; includeSubDomains
  { "messages": [ { "to": "+61xxxxxxxx", "deliveryStatus": "MessageWaiting", "messageId": "f457f36000006d4900000000017a5ec802800001-12614xxxxxxxx", "messageStatusURL": "https://tapi.telstra.com/v2/messages/sms/f457f36000006d4900000000017a5ec802800001-12614xxxxxxxx/status" } ], "NumberInternationalDestinations": 0, "NumberNationalDestinations": 1, "messageType": "SMS", "numberSegments": 1 }     Could this be validated; and documentation updated to reflect >0 is required? 'Try it now' uses '0' as the default value for these fields, perhaps a more sensible default of validity=60 and scheduledDelivery=1 used.     ...appologies for the formatting, WYSIWYG editor is being a bit wishful Cheers, James Elsdon

DeveloperSteve's picture
by DeveloperSteve

Hi James, 
Hi James,  Yep you are correct that the validity needs to be > 0, ill get the documentation updated and have requested an update to a future release so that it defaults to 1. 
Log in or register to post comments