Hi,
I'm getting this error when trying to send a message with a free trial api, is that normal? Do I have to get a piad account to test the message api?
{
"status": "404",
"code": "RESOURCE-NOT-FOUND",
"message": "Invalid resource. Refer to API docs at https://dev.telstra.com"
}
Hey,
I just started playing around with the API the other day so dont take this as gospel.
I believe you need to create a subscription first so that the API knows what number to send from.
A subscription reserves your sending number (free API only reserves for 30 days).
Workflow:
Auth > Create Subsciption > Send SMS
Also I had issues sending messages without specifing a 'validity' so make sure you specify that too.
Hope this helps.
Thanks jarrataurian that's exactly right!
There are several situations which could cause a 404 error like this, including not having a valid subscription to send FROM or the desitination (TO) address is invalid. (noted, we will update the documentation to be more specific on the cases that will cause this 404 error!)
In your casegavin_3, please re-provision your subscription using the same client credentials, re-check the destination mobile number and confirm if the issue still persists! It never hurts to send some test calls in postman to your own number. Check out 'Getting Started' under the docs for the Postman collections.
Using a newly made api key, I am provisioned with the same phone number on all of my keys. getting the subscription returns a 404 as does sending a message.
Hey ,
As per the above; You need to make sure you have a provisioned dedicated number before you can send an SMS.
Provision (create) a dedicated number subscription, or renew your dedicated number if it has expired.
You can find the instructions on our documentation: https://dev.telstra.com/content/messaging-api#tag/Provisioning
Perform a GET /provisioning/subscriptions call and ensure that your provisioned number is still actively linked to your API key. Otherwise, you will need to perform a POST /provisioning/subscriptions call to re-provision your API MSISDN to your API key.
If you need further help, please follow the steps on our Getting Started Guide and let me know if that still doesn't help: https://dev.telstra.com/content/get-started-telstradev-messaging-api
I promise you that is exactly what i am doing within postman,
I make a new Api key, create the token, create the subscription (*the phone number is the same for all of my api keys and i am using the correct (new) bearer), then i try a get subscription and it 404's, as does sending a message.
Also, i can use my free api key and it works fine using this method.
This has worked for me 50+ times in the past, and as of late has completely stopped working.
Hi Lachie,
Each App (under My Apps & Keys) with different client credentials will have a different Virtual Mobile Number provisioned for each.
Can you please confirm whether you are using the free trial or paid API keys?
For free trial: only allows ONE Virtual Mobile Number Subscription. So if you attempt to create a new app and use those keys in the free trial account, it will fail to create subscription. Please use only the original Free Trial app.
For paid keys: you should be able to create several Apps, each with their own Virtual Mobile Number Subscription. Some users have issues accessing their paid keys, as you need to have switched to the relevant billing company before going to my Apps & Keys. Our FAQ explains how to access paid keys: https://dev.telstra.com/support/frequently-asked-questions
Let me know how that goes? Would be good to hear if anyone else has seen the same issue
I am 100% using my paid keys,
My free key provisions fine using the same method.
Let me know your thoughts.
Hi Lachie,
This may then be an issue if you are using credit card or Telstra billing account (credit card is no longer a valid billing method), or there may be an issue with your account. Let's resolve over meail so you can share some screenshots and account details with us. I'll be in contact!
Good news! We have now updated our Messaging API documentation to include more informative troubleshooting steps for this and all other error codes!
Check it out, and give us your feedback: https://dev.telstra.com/content/messaging-api#operation/createSubscription