I'm getting intermittent errors when attempting to send SMS's like this:
Exception when calling MessagingApi->SendSMS: [400] Client error: `POST https://tapi.telstra.com/v2/messages/sms` resulted in a `400 Bad Request` response:
{
"status":"400",
"code":"NOT-PROVISIONED",
"message":"Your active days is currently set to 0 or (truncated...)
I was getting these this morning as well, but then it worked fine after about 9am. Anybody else seeing intermittent issues like this?
Simon
Did you do a provision/subcription call first to provision a line against the API keys?
Ok, so a little bug with my code, I assumed that getSubscription would fail after the active days expired, but in fact it doesn't, so it worked until my subscription expired
Adjusted my code so that it tests if the active_days >= 0 and if so creates the subscription again.
Is that the typical sort of flow expected?
Pushing the change to https://github.com/singularo/telstra-sms2
For any "NOT-PROVISIONED", please use the GET/subscription endpoint to re-provision your virtual mobile number.
Check the Messaging API documentation if you need help on that endpoint
Note that all free trial subscriptions have only 30 active days before they should be re-provisioned.