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

You are here

test art

BY drupal admin 01 September 2021

Hello awesome dev community! It’s Vinodh from TelstraDev (dev.telstra.com) Support team.

If you ever find yourself not able to send SMS / MMS with Telstra’s Messaging API, this is the right place to be.  I wanted to share some general guidelines on how you could troubleshoot Messaging API, and the basic steps to follow in order to isolate the behavior further and resolve on your own if it’s available.

We’ll go through the following steps together:

  • Troubleshooting GET Authentication and steps to follow if encountered with an error
  • Troubleshooting GET subscription call and steps to follow if encountered with an error 
  • Troubleshooting POST subscription call and steps to follow if encountered with an error 
  • Troubleshooting POST send sms and steps to follow if encountered with an error

Troubleshooting is not applicable to the below situations:

1. If you are a Free Trial user and have created additional keys, Messaging API using the additional keys will not work for you.  You need to use only the default keys in your profile.  If you need support, please drop a post in our forum https://dev.telstra.com/forums/messaging-api-forum.  

2. If you have signed up using credit card as the billing method, Messaging API will not work.  You need to sign up using Telstra Account.  If you do not have one, you can request one from our portal here https://dev.telstra.com/content/requesting-telstra-billing-account.  If you need more support, please drop a post in our forum https://dev.telstra.com/forums/messaging-api-forum.  

 

Pre-requisites:

 

Postman - Download Postman using run in postman link 

Telstra Messaging API Json collection & Telstra Messaging API Environment collection. This should be available in the postman instance you setup using previous step. 

Keys to Messaging API (ensure you are using the right keys). Once logged in to your company, Keys can be found by navigating to https://dev.telstra.com/user/me/apps 

 

 

 

How do I troubleshoot Messaging API calls?

This guide goes through few different steps you can troubleshoot to identify the problem and potentially fix them yourself. These are basic steps you can take into account if something doesn’t seem to be working. You can use this guide to figure out the best next course of action and when to reach support team and what details to be shared with support team to diagnose this issue further.  Before we jump into the details of the troubleshooting, please ensure you reviewed the below statements:

Part 1: Troubleshooting GET Authentication

Ensure you read the instructions from https://dev.telstra.com/content/messaging-api#tag/Authentication 

Perform a POST https://tapi.telstra.com/v2/oauth/token using the request body provided in above example by replacing your keys & secrets using postman (or any other method you are comfortable with)

Example Request:

{

    "client_id": “clientIDABCDEFGH”,

    "client_secret": “secretxyzabc”,

    "grant_type": "client_credentials"

  }

 

Example (200 OK) succesful response 

{

    "access_token": "z3uJa7SFILabcdefghy5YFWN9ql",

    "token_type": "Bearer",

    "expires_in": "3599"

}

 

If you did not get this response, please e-mail TelstraDev (dev.telstra.com) at telstradev@team.telstra.com along with your company name registered with us to triage this issue.  DO NOT share client secret or client keys (as we have access to these for troubleshooting purposes).

 

Part 2: Troubleshooting GET subscription

Ensure you read the instructions from https://dev.telstra.com/content/messaging-api#operation/getSubscription 

Perform a GET https://tapi.telstra.com/v2/messages/provisioning/subscriptions using postman (or any other method you are comfortable. Request body is not required).

Example Request:

No request body, use above request header.

Example (200 OK) successful response:

{

    "destinationAddress": “+61412345678”,

    "activeDays": "1824”

}

 

If you did not get above response your subscription may have expired.  To troubleshoot and potentially resolve this issue, go to Part 3.

 

Part 3: Troubleshooting POST subscription

Ensure you read the instructions from https://dev.telstra.com/content/messaging-api#operation/createSubscription using postman (or any other method you are comfortable)

Perform a POST https://tapi.telstra.com/v2/messages/provisioning/subscriptions.  

Example Request:

(if not using notifyURL feature)

{

"activeDays": 1825

}

 

OR

{

"activeDays": 1825,

“NotifyURL”: “http://yournotifyurl.com/“

}

 

You should get a (201 created) successful response that is similar to below.

{

    "destinationAddress": "+61412345678”,

    "activeDays": “1824”

}

 

If you did not get successful response, please e-mail TelstraDev (dev.telstra.com) at telstradev@team.telstra.com along with above request and response details company name registered with us to triage this issue.  DO NOT share client secret or client keys (as we have access to these for troubleshooting purposes).

If you get above response, wait for 5 minutes and repeat Part 2 - GET Subscription.  You should get a successful response for GET Subscription.

If you did not get successful response from GET Subscription, please e-mail TelstraDev (dev.telstra.com) at telstradev@team.telstra.com along with your company name registered with us to triage this issue.  DO NOT share client secret or client keys (as we have access to these for troubleshooting purposes).

 

Part 4: Troubleshooting POST send sms 

Ensure you read the instructions from https://dev.telstra.com/content/messaging-api#operation/sendSms using postman (or any other method you are comfortable with)

Perform a POST https://tapi.telstra.com/v2/messages/sms.  

Example Request:

{

  "to”:”+61XXXXXXXXXX”,

  "validity":"60",

  "priority":false,

  "body":"Message text goes here"

}

 

Expected Response (200 OK):

{

      to: '+61XXXXXXXXXX',

      deliveryStatus: 'MessageWaiting',

      messageId: 'XYZ’,

      messageStatusURL: 'https://tapi.telstra.com/v2/messages/sms/XYZ/status'

    }

  ],

  Country: [ { AUS: 1 } ],

  messageType: 'SMS',

  numberSegments: 1

}

 

If you did not get successful response, please e-mail TelstraDev (dev.telstra.com) at telstradev@team.telstra.com along with your company name registered with us to triage this issue.  DO NOT share client secret or client keys (as we have access to these for troubleshooting purposes).