diff --git a/README.md b/README.md index 5fa4b1e..51dccc8 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ - API version: 2.2.6 -- Package version: 1.0.4 +- Package version: 1.0.4.1 ## Requirements. @@ -43,11 +43,12 @@ import time import Telstra_Messaging from Telstra_Messaging.rest import ApiException from pprint import pprint + # create an instance of the API class -api_instance = Telstra_Messaging.AuthenticationApi() +api_instance = Telstra_Messaging.AuthenticationApi(Telstra_Messaging.ApiClient(configuration)) client_id = 'client_id_example' # str | client_secret = 'client_secret_example' # str | -grant_type = 'client_credentials' # str | (default to client_credentials) +grant_type = 'client_credentials' # str | (default to 'client_credentials') try: # Generate OAuth2 token @@ -67,6 +68,7 @@ Class | Method | HTTP request | Description *AuthenticationApi* | [**auth_token**](docs/AuthenticationApi.md#auth_token) | **POST** /oauth/token | Generate OAuth2 token *MessagingApi* | [**get_mms_status**](docs/MessagingApi.md#get_mms_status) | **GET** /messages/mms/{messageid}/status | Get MMS Status *MessagingApi* | [**get_sms_status**](docs/MessagingApi.md#get_sms_status) | **GET** /messages/sms/{messageId}/status | Get SMS Status +*MessagingApi* | [**retrieve_mms_responses**](docs/MessagingApi.md#retrieve_mms_responses) | **GET** /messages/mms | Retrieve MMS Responses *MessagingApi* | [**retrieve_sms_responses**](docs/MessagingApi.md#retrieve_sms_responses) | **GET** /messages/sms | Retrieve SMS Responses *MessagingApi* | [**send_mms**](docs/MessagingApi.md#send_mms) | **POST** /messages/mms | Send MMS *MessagingApi* | [**send_sms**](docs/MessagingApi.md#send_sms) | **POST** /messages/sms | Send SMS diff --git a/Telstra_Messaging/__init__.py b/Telstra_Messaging/__init__.py index 026503c..e382bad 100644 --- a/Telstra_Messaging/__init__.py +++ b/Telstra_Messaging/__init__.py @@ -5,11 +5,10 @@ """ Telstra Messaging API - # Introduction Send and receive SMS and MMS messages globally using Telstra’s enterprise grade Messaging API. It also allows your application to track the delivery status of both sent and received messages. Get your dedicated Australian number, and start sending and receiving messages today. # Features

The Telstra Messaging API provides the features below.
Feature Description
Dedicated Number Provision a mobile number for your account to be used as from address in the API
Send Messages Sending SMS or MMS messages
Receive Messages Telstra will deliver messages sent to a dedicated number or to the notifyURL defined by you
Broadcast Messages Invoke a single API to send a message to a list of number provided in to
Delivery Status Query the delivery status of your messages
Callbacks Provide a notification URL and Telstra will notify your app when messages status changes
Alphanumeric Identifier Differentiate yourself by providing an alphanumeric string in from. This feature is only available on paid plans
Concatenation Send messages up to 1900 characters long and Telstra will automaticaly segment and reassemble them
Reply Request Create a chat session by associating messageId and to number to track responses received from a mobile number. We will store this association for 8 days
Character set Accepts all Unicode characters as part of UTF-8
Bounce-back response See if your SMS hits an unreachable or unallocated number (Australia Only)
Queuing Messaging API will automatically queue and deliver each message at a compliant rate.
Emoji Encoding The API supports the encoding of the full range of emojis. Emojis in the reply messages will be in their UTF-8 format.
# Getting Access to the API

  1. Register at https://dev.telstra.com.
  2. After registration, login to https://dev.telstra.com and navigate to the "My apps" page.
  3. Create your application by clicking the "Add new app" button
  4. Select "API Free Trial" Product when configuring your application. This Product includes the Telstra Messaging API as well as other APIs. Your application will be approved automatically.
  5. There is a maximum of 1000 free messages per developer. Additional messages and features can be purchased from https://dev.telstra.com.
  6. Note your Client key and Client secret as these will be needed to provision a number for your application and for authentication.

Now head over to Getting Started where you can find a postman collection as well as some links to sample apps and SDKs to get you started.

Happy Messaging! # Getting Started

Below are the steps to get started with the Telstra Messaging API.

  1. Generate OAuth2 Token using your Client key and Client secret.
  2. Create Subscription in order to receive a provisioned number.
  3. Send Message to a specific mobile number.

Run in Postman

\"Run

Sample Apps

- Perl Sample App - Happy Chat App - PHP Sample App

SDK repos

- Messaging API - PHP SDK - Messaging API - Python SDK - Messaging API - Ruby SDK - Messaging API - NodeJS SDK - Messaging API - .Net2 SDK - Messaging API - Java SDK # Delivery Notification The API provides several methods for notifying when a message has been delivered to the destination.
  1. When you provision a number there is an opportunity to specify a notifyURL, when the message has been delivered the API will make a call to this URL to advise of the message status. If this is not provided then you can make use the Get Replies API to poll for messages.
  2. If you do not specify a URL you can always call the GET /sms API get the latest replies to the message.
Please note that the notification URLs and the polling call are exclusive. If a notification URL has been set then the polling call will not provide any useful information.

Notification URL Format

When a message has reached its final state, the API will send a POST to the URL that has been previously specified.

Notification URL Format for SMS

{     to: '+61418123456'     sentTimestamp: '2017-03-17T10:05:22+10:00'     receivedTimestamp: '2017-03-17T10:05:23+10:00'     messageId: /cccb284200035236000000000ee9d074019e0301/1261418123456     deliveryStatus: DELIVRD   } 
\\ The fields are:
Field Description
to The number the message was sent to.
receivedTimestamp Time the message was sent to the API.
sentTimestamp Time handling of the message ended.
deliveryStatus The final state of the message.
messageId The same reference that was returned when the original message was sent.
receivedTimestamp Time the message was sent to the API.
Upon receiving this call it is expected that your servers will give a 204 (No Content) response. Anything else will cause the API to reattempt the call 5 minutes later.

Notification URL Format for SMS Replies

{     \"status\": \"RECEIVED\"     \"destinationAddress\": \"+61418123456\"     \"senderAddress\": \"+61421987654\"     \"message\": \"Foo\"             \"sentTimestamp\": \"2018-03-23T12:10:06+10:00\"   }                              
\\ The fields are:
Field Description
status The final state of the message.
destinationAddress The number the message was sent to.
senderAddress The number the message was sent from.
message The sontent of the SMS reply.
sentTimestamp Time handling of the message ended.

Notification URL Format for MMS Replies

{     \"status\": \"RECEIVED\",     \"destinationAddress\": \"+61418123456\",     \"senderAddress\": \"+61421987654\",     \"subject\": \"Foo\",     \"sentTimestamp\": \"2018-03-23T12:15:45+10:00\",     \"envelope\": \"string\",     \"MMSContent\":      [       {         \"type\": \"application/smil\",         \"filename\": \"smil.xml\",         \"payload\": \"string\"       },        {         \"type\": \"image/jpeg\",         \"filename\": \"sample.jpeg\",         \"payload\": \"string\"        }      ]    } 
\\ The fields are:
Field Description
status The final state of the message.
destinationAddress The number the message was sent to.
senderAddress The number the message was sent from.
subject The subject assigned to the message.
sentTimestamp Time handling of the message ended.
envelope Information about about terminal type and originating operator.
MMSContent An array of the actual content of the reply message.
type The content type of the message.
filename The filename for the message content.
payload The content of the message.
# Frequently Asked Questions **Q: Can I send a broadcast message using the Telstra Messging API?** A. Yes. Recipient numbers can be in teh form of an array of strings if a broadcast message needs to be sent.

Notes

View messaging in Swagger UI # noqa: E501 + # Introduction Send and receive SMS and MMS messages globally using Telstra’s enterprise grade Messaging API. It also allows your application to track the delivery status of both sent and received messages. Get your dedicated Australian number, and start sending and receiving messages today. # Features The Telstra Messaging API provides the features below. | Feature | Description | | --- | --- | | `Dedicated Number` | Provision a mobile number for your account to be used as `from` address in the API | | `Send Messages` | Sending SMS or MMS messages | | `Receive Messages` | Telstra will deliver messages sent to a dedicated number or to the `notifyURL` defined by you | | `Broadcast Messages` | Invoke a single API call to send a message to a list of numbers provided in `to` | | `Delivery Status` | Query the delivery status of your messages | | `Callbacks` | Provide a notification URL and Telstra will notify your app when a message status changes | | `Alphanumeric Identifier` | Differentiate yourself by providing an alphanumeric string in `from`. This feature is only available on paid plans | | `Concatenation` | Send messages up to 1900 characters long and Telstra will automaticaly segment and reassemble them | | `Reply Request` | Create a chat session by associating `messageId` and `to` number to track responses received from a mobile number. We will store this association for 8 days | | `Character set` | Accepts all Unicode characters as part of UTF-8 | | `Bounce-back response` | See if your SMS hits an unreachable or unallocated number (Australia Only) | | `Queuing` | Messaging API will automatically queue and deliver each message at a compliant rate. | | `Emoji Encoding` | The API supports the encoding of the full range of emojis. Emojis in the reply messages will be in their UTF-8 format. | ## Delivery Notification or Callbacks The API provides several methods for notifying when a message has been delivered to the destination. 1. When you send a message there is an opportunity to specify a `notifyURL`. Once the message has been delivered the API will make a call to this URL to advise of the message status. 2. If you do not specify a URL you can always call the `GET /status` API to get the status of the message. # Getting Access to the API 1. Register at [https://dev.telstra.com](https://dev.telstra.com). 2. After registration, login to [https://dev.telstra.com](https://dev.telstra.com) and navigate to the **My apps** page. 3. Create your application by clicking the **Add new app** button 4. Select **API Free Trial** Product when configuring your application. This Product includes the Telstra Messaging API as well as other free trial APIs. Your application will be approved automatically. 5. There is a maximum of 1000 free messages per developer. Additional messages and features can be purchased from [https://dev.telstra.com](https://dev.telstra.com). 6. Note your `Client key` and `Client secret` as these will be needed to provision a number for your application and for authentication. Now head over to **Getting Started** where you can find a postman collection as well as some links to sample apps and SDKs to get you started. Happy Messaging! # Frequently Asked Questions **Q: Is creating a subscription via the Provisioning call a required step?** A. Yes. You will only be able to start sending messages if you have a provisioned dedicated number. Use Provisioning to create a dedicated number subscription, or renew your dedicated number if it has expired. **Q: When trying to send an SMS I receive a `400 Bad Request` response. How can I fix this?** A. You need to make sure you have a provisioned dedicated number before you can send an SMS. If you do not have a provisioned dedicated number and you try to send a message via the API, you will get the error below in the response:
{   \"status\":\"400\",   \"code\":\"DELIVERY-IMPOSSIBLE\",   \"message\":\"Invalid \\'from\\' address specified\" }
Use Provisioning to create a dedicated number subscription, or renew your dedicated number if it has expired. **Q: Can I send a broadcast message using the Telstra Messaging API?** A. Yes. Recipient numbers can be in the form of an array of strings if a broadcast message needs to be sent, allowing you to send to multiple mobile numbers in one API call. A sample request body for this will be: `{\"to\":[\"+61412345678\",\"+61487654321\"],\"body\":\"Test Message\"}` **Q: Can I use `Alphanumeric Identifier` from my paid plan via credit card?** A. `Alphanumeric Identifier` is only available on Telstra Account paid plans, not through credit card paid plans. **Q: How long does my dedicated number stay active for?** A. When you provision a dedicated number, by default it will be active for 30-days. You can use the `activeDays` parameter during the provisioning call to increment or decrement the number of days your dedicated number will remain active. **Q: What is the maximum sized MMS that I can send?** A. This will depend on the carrier that will receive the MMS. For Telstra it's up to 2MB, Optus up to 1.5MB and Vodafone only allows up to 500kB. You will need to check with international carriers for thier MMS size limits. **Q: Are SMILs supported by the Messaging API?** A. While there will be no error if you send an MMS with a SMIL presentation, the actual layout or sequence defined in the SMIL may not display as expected because most of the new smartphone devices ignore the SMIL presentation layer. SMIL was used in feature phones which had limited capability and SMIL allowed a *powerpoint type* presentation to be provided. Smartphones now have the capability to display video which is the better option for presentations. It is recommended that MMS messages should just drop the SMIL. **Q: How do I assign a delivery notification or callback URL?** A. You can assign a delivery notification or callback URL by adding the `notifyURL` parameter in the body of the request when you send a message. Once the message has been delivered, a notification will then be posted to this callback URL. **Q: What is the difference between the `notifyURL` parameter in the Provisoning call versus the `notifyURL` parameter in the Send Message call?** A. The `notifyURL` in the Provisoning call will be the URL where replies to the provisioned number will be posted. On the other hand, the `notifyURL` in the Send Message call will be the URL where the delivery notification will be posted, e.g. when an SMS has already been delivered to the recipient. # Getting Started Below are the steps to get started with the Telstra Messaging API. 1. Generate an OAuth2 token using your `Client key` and `Client secret`. 2. Use the Provisioning call to create a subscription and receive a dedicated number. 3. Send a message to a specific mobile number. ## Run in Postman \"Run ## Sample Apps - [Perl Sample App](https://github.com/telstra/MessagingAPI-perl-sample-app) - [Happy Chat App](https://github.com/telstra/messaging-sample-code-happy-chat) - [PHP Sample App](https://github.com/developersteve/telstra-messaging-php) ## SDK Repos - [Messaging API - PHP SDK](https://github.com/telstra/MessagingAPI-SDK-php) - [Messaging API - Python SDK](https://github.com/telstra/MessagingAPI-SDK-python) - [Messaging API - Ruby SDK](https://github.com/telstra/MessagingAPI-SDK-ruby) - [Messaging API - NodeJS SDK](https://github.com/telstra/MessagingAPI-SDK-node) - [Messaging API - .Net2 SDK](https://github.com/telstra/MessagingAPI-SDK-dotnet) - [Messaging API - Java SDK](https://github.com/telstra/MessagingAPI-SDK-Java) ## Blog Posts For more information on the Messaging API, you can read these blog posts: - [Callbacks Part 1](https://dev.telstra.com/content/understanding-messaging-api-callbacks-part-1) - [Callbacks Part 2](https://dev.telstra.com/content/understanding-messaging-api-callbacks-part-2) # noqa: E501 OpenAPI spec version: 2.2.6 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/Telstra_Messaging/api/authentication_api.py b/Telstra_Messaging/api/authentication_api.py index 6d08097..9286a1c 100644 --- a/Telstra_Messaging/api/authentication_api.py +++ b/Telstra_Messaging/api/authentication_api.py @@ -3,11 +3,10 @@ """ Telstra Messaging API - # Introduction Send and receive SMS and MMS messages globally using Telstra’s enterprise grade Messaging API. It also allows your application to track the delivery status of both sent and received messages. Get your dedicated Australian number, and start sending and receiving messages today. # Features

The Telstra Messaging API provides the features below.
Feature Description
Dedicated Number Provision a mobile number for your account to be used as from address in the API
Send Messages Sending SMS or MMS messages
Receive Messages Telstra will deliver messages sent to a dedicated number or to the notifyURL defined by you
Broadcast Messages Invoke a single API to send a message to a list of number provided in to
Delivery Status Query the delivery status of your messages
Callbacks Provide a notification URL and Telstra will notify your app when messages status changes
Alphanumeric Identifier Differentiate yourself by providing an alphanumeric string in from. This feature is only available on paid plans
Concatenation Send messages up to 1900 characters long and Telstra will automaticaly segment and reassemble them
Reply Request Create a chat session by associating messageId and to number to track responses received from a mobile number. We will store this association for 8 days
Character set Accepts all Unicode characters as part of UTF-8
Bounce-back response See if your SMS hits an unreachable or unallocated number (Australia Only)
Queuing Messaging API will automatically queue and deliver each message at a compliant rate.
Emoji Encoding The API supports the encoding of the full range of emojis. Emojis in the reply messages will be in their UTF-8 format.
# Getting Access to the API

  1. Register at https://dev.telstra.com.
  2. After registration, login to https://dev.telstra.com and navigate to the "My apps" page.
  3. Create your application by clicking the "Add new app" button
  4. Select "API Free Trial" Product when configuring your application. This Product includes the Telstra Messaging API as well as other APIs. Your application will be approved automatically.
  5. There is a maximum of 1000 free messages per developer. Additional messages and features can be purchased from https://dev.telstra.com.
  6. Note your Client key and Client secret as these will be needed to provision a number for your application and for authentication.

Now head over to Getting Started where you can find a postman collection as well as some links to sample apps and SDKs to get you started.

Happy Messaging! # Getting Started

Below are the steps to get started with the Telstra Messaging API.

  1. Generate OAuth2 Token using your Client key and Client secret.
  2. Create Subscription in order to receive a provisioned number.
  3. Send Message to a specific mobile number.

Run in Postman

\"Run

Sample Apps

- Perl Sample App - Happy Chat App - PHP Sample App

SDK repos

- Messaging API - PHP SDK - Messaging API - Python SDK - Messaging API - Ruby SDK - Messaging API - NodeJS SDK - Messaging API - .Net2 SDK - Messaging API - Java SDK # Delivery Notification The API provides several methods for notifying when a message has been delivered to the destination.
  1. When you provision a number there is an opportunity to specify a notifyURL, when the message has been delivered the API will make a call to this URL to advise of the message status. If this is not provided then you can make use the Get Replies API to poll for messages.
  2. If you do not specify a URL you can always call the GET /sms API get the latest replies to the message.
Please note that the notification URLs and the polling call are exclusive. If a notification URL has been set then the polling call will not provide any useful information.

Notification URL Format

When a message has reached its final state, the API will send a POST to the URL that has been previously specified.

Notification URL Format for SMS

{     to: '+61418123456'     sentTimestamp: '2017-03-17T10:05:22+10:00'     receivedTimestamp: '2017-03-17T10:05:23+10:00'     messageId: /cccb284200035236000000000ee9d074019e0301/1261418123456     deliveryStatus: DELIVRD   } 
\\ The fields are:
Field Description
to The number the message was sent to.
receivedTimestamp Time the message was sent to the API.
sentTimestamp Time handling of the message ended.
deliveryStatus The final state of the message.
messageId The same reference that was returned when the original message was sent.
receivedTimestamp Time the message was sent to the API.
Upon receiving this call it is expected that your servers will give a 204 (No Content) response. Anything else will cause the API to reattempt the call 5 minutes later.

Notification URL Format for SMS Replies

{     \"status\": \"RECEIVED\"     \"destinationAddress\": \"+61418123456\"     \"senderAddress\": \"+61421987654\"     \"message\": \"Foo\"             \"sentTimestamp\": \"2018-03-23T12:10:06+10:00\"   }                              
\\ The fields are:
Field Description
status The final state of the message.
destinationAddress The number the message was sent to.
senderAddress The number the message was sent from.
message The sontent of the SMS reply.
sentTimestamp Time handling of the message ended.

Notification URL Format for MMS Replies

{     \"status\": \"RECEIVED\",     \"destinationAddress\": \"+61418123456\",     \"senderAddress\": \"+61421987654\",     \"subject\": \"Foo\",     \"sentTimestamp\": \"2018-03-23T12:15:45+10:00\",     \"envelope\": \"string\",     \"MMSContent\":      [       {         \"type\": \"application/smil\",         \"filename\": \"smil.xml\",         \"payload\": \"string\"       },        {         \"type\": \"image/jpeg\",         \"filename\": \"sample.jpeg\",         \"payload\": \"string\"        }      ]    } 
\\ The fields are:
Field Description
status The final state of the message.
destinationAddress The number the message was sent to.
senderAddress The number the message was sent from.
subject The subject assigned to the message.
sentTimestamp Time handling of the message ended.
envelope Information about about terminal type and originating operator.
MMSContent An array of the actual content of the reply message.
type The content type of the message.
filename The filename for the message content.
payload The content of the message.
# Frequently Asked Questions **Q: Can I send a broadcast message using the Telstra Messging API?** A. Yes. Recipient numbers can be in teh form of an array of strings if a broadcast message needs to be sent.

Notes

View messaging in Swagger UI # noqa: E501 + # Introduction Send and receive SMS and MMS messages globally using Telstra’s enterprise grade Messaging API. It also allows your application to track the delivery status of both sent and received messages. Get your dedicated Australian number, and start sending and receiving messages today. # Features The Telstra Messaging API provides the features below. | Feature | Description | | --- | --- | | `Dedicated Number` | Provision a mobile number for your account to be used as `from` address in the API | | `Send Messages` | Sending SMS or MMS messages | | `Receive Messages` | Telstra will deliver messages sent to a dedicated number or to the `notifyURL` defined by you | | `Broadcast Messages` | Invoke a single API call to send a message to a list of numbers provided in `to` | | `Delivery Status` | Query the delivery status of your messages | | `Callbacks` | Provide a notification URL and Telstra will notify your app when a message status changes | | `Alphanumeric Identifier` | Differentiate yourself by providing an alphanumeric string in `from`. This feature is only available on paid plans | | `Concatenation` | Send messages up to 1900 characters long and Telstra will automaticaly segment and reassemble them | | `Reply Request` | Create a chat session by associating `messageId` and `to` number to track responses received from a mobile number. We will store this association for 8 days | | `Character set` | Accepts all Unicode characters as part of UTF-8 | | `Bounce-back response` | See if your SMS hits an unreachable or unallocated number (Australia Only) | | `Queuing` | Messaging API will automatically queue and deliver each message at a compliant rate. | | `Emoji Encoding` | The API supports the encoding of the full range of emojis. Emojis in the reply messages will be in their UTF-8 format. | ## Delivery Notification or Callbacks The API provides several methods for notifying when a message has been delivered to the destination. 1. When you send a message there is an opportunity to specify a `notifyURL`. Once the message has been delivered the API will make a call to this URL to advise of the message status. 2. If you do not specify a URL you can always call the `GET /status` API to get the status of the message. # Getting Access to the API 1. Register at [https://dev.telstra.com](https://dev.telstra.com). 2. After registration, login to [https://dev.telstra.com](https://dev.telstra.com) and navigate to the **My apps** page. 3. Create your application by clicking the **Add new app** button 4. Select **API Free Trial** Product when configuring your application. This Product includes the Telstra Messaging API as well as other free trial APIs. Your application will be approved automatically. 5. There is a maximum of 1000 free messages per developer. Additional messages and features can be purchased from [https://dev.telstra.com](https://dev.telstra.com). 6. Note your `Client key` and `Client secret` as these will be needed to provision a number for your application and for authentication. Now head over to **Getting Started** where you can find a postman collection as well as some links to sample apps and SDKs to get you started. Happy Messaging! # Frequently Asked Questions **Q: Is creating a subscription via the Provisioning call a required step?** A. Yes. You will only be able to start sending messages if you have a provisioned dedicated number. Use Provisioning to create a dedicated number subscription, or renew your dedicated number if it has expired. **Q: When trying to send an SMS I receive a `400 Bad Request` response. How can I fix this?** A. You need to make sure you have a provisioned dedicated number before you can send an SMS. If you do not have a provisioned dedicated number and you try to send a message via the API, you will get the error below in the response:
{   \"status\":\"400\",   \"code\":\"DELIVERY-IMPOSSIBLE\",   \"message\":\"Invalid \\'from\\' address specified\" }
Use Provisioning to create a dedicated number subscription, or renew your dedicated number if it has expired. **Q: Can I send a broadcast message using the Telstra Messaging API?** A. Yes. Recipient numbers can be in the form of an array of strings if a broadcast message needs to be sent, allowing you to send to multiple mobile numbers in one API call. A sample request body for this will be: `{\"to\":[\"+61412345678\",\"+61487654321\"],\"body\":\"Test Message\"}` **Q: Can I use `Alphanumeric Identifier` from my paid plan via credit card?** A. `Alphanumeric Identifier` is only available on Telstra Account paid plans, not through credit card paid plans. **Q: How long does my dedicated number stay active for?** A. When you provision a dedicated number, by default it will be active for 30-days. You can use the `activeDays` parameter during the provisioning call to increment or decrement the number of days your dedicated number will remain active. **Q: What is the maximum sized MMS that I can send?** A. This will depend on the carrier that will receive the MMS. For Telstra it's up to 2MB, Optus up to 1.5MB and Vodafone only allows up to 500kB. You will need to check with international carriers for thier MMS size limits. **Q: Are SMILs supported by the Messaging API?** A. While there will be no error if you send an MMS with a SMIL presentation, the actual layout or sequence defined in the SMIL may not display as expected because most of the new smartphone devices ignore the SMIL presentation layer. SMIL was used in feature phones which had limited capability and SMIL allowed a *powerpoint type* presentation to be provided. Smartphones now have the capability to display video which is the better option for presentations. It is recommended that MMS messages should just drop the SMIL. **Q: How do I assign a delivery notification or callback URL?** A. You can assign a delivery notification or callback URL by adding the `notifyURL` parameter in the body of the request when you send a message. Once the message has been delivered, a notification will then be posted to this callback URL. **Q: What is the difference between the `notifyURL` parameter in the Provisoning call versus the `notifyURL` parameter in the Send Message call?** A. The `notifyURL` in the Provisoning call will be the URL where replies to the provisioned number will be posted. On the other hand, the `notifyURL` in the Send Message call will be the URL where the delivery notification will be posted, e.g. when an SMS has already been delivered to the recipient. # Getting Started Below are the steps to get started with the Telstra Messaging API. 1. Generate an OAuth2 token using your `Client key` and `Client secret`. 2. Use the Provisioning call to create a subscription and receive a dedicated number. 3. Send a message to a specific mobile number. ## Run in Postman \"Run ## Sample Apps - [Perl Sample App](https://github.com/telstra/MessagingAPI-perl-sample-app) - [Happy Chat App](https://github.com/telstra/messaging-sample-code-happy-chat) - [PHP Sample App](https://github.com/developersteve/telstra-messaging-php) ## SDK Repos - [Messaging API - PHP SDK](https://github.com/telstra/MessagingAPI-SDK-php) - [Messaging API - Python SDK](https://github.com/telstra/MessagingAPI-SDK-python) - [Messaging API - Ruby SDK](https://github.com/telstra/MessagingAPI-SDK-ruby) - [Messaging API - NodeJS SDK](https://github.com/telstra/MessagingAPI-SDK-node) - [Messaging API - .Net2 SDK](https://github.com/telstra/MessagingAPI-SDK-dotnet) - [Messaging API - Java SDK](https://github.com/telstra/MessagingAPI-SDK-Java) ## Blog Posts For more information on the Messaging API, you can read these blog posts: - [Callbacks Part 1](https://dev.telstra.com/content/understanding-messaging-api-callbacks-part-1) - [Callbacks Part 2](https://dev.telstra.com/content/understanding-messaging-api-callbacks-part-2) # noqa: E501 OpenAPI spec version: 2.2.6 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -22,10 +21,10 @@ class AuthenticationApi(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen """ def __init__(self, api_client=None): @@ -36,7 +35,7 @@ def __init__(self, api_client=None): def auth_token(self, client_id, client_secret, grant_type, **kwargs): # noqa: E501 """Generate OAuth2 token # noqa: E501 - To generate an OAuth2 Authentication token, pass through your `Client key` and `Client secret` that you received when you registered for the "API Free Trial" Product. The grant_type should be left as `client_credentials` and the scope as `NSMS`. The token will expire in one hour.
   #!/bin/bash   # Obtain these keys from the Telstra Developer Portal   CLIENT_KEY=\"your client key\"   CLIENT_SECRET=\"your client secret\"   curl -X POST -H 'Content-Type: application/x-www-form-urlencoded' \\   -d 'grant_type=client_credentials&client_id=$CLIENT_KEY&client_secret=CLIENT_SECRET&scope=NSMS' \\   'https://tapi.telstra.com/v2/oauth/token' 
# noqa: E501 + To generate an OAuth2 Authentication token, pass through your `Client key` and `Client secret` that you received when you registered for the **API Free Trial** Product. The grant_type should be left as `client_credentials` and the scope as `NSMS`. The token will expire in one hour. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True >>> thread = api.auth_token(client_id, client_secret, grant_type, async=True) @@ -60,7 +59,7 @@ def auth_token(self, client_id, client_secret, grant_type, **kwargs): # noqa: E def auth_token_with_http_info(self, client_id, client_secret, grant_type, **kwargs): # noqa: E501 """Generate OAuth2 token # noqa: E501 - To generate an OAuth2 Authentication token, pass through your `Client key` and `Client secret` that you received when you registered for the "API Free Trial" Product. The grant_type should be left as `client_credentials` and the scope as `NSMS`. The token will expire in one hour.
   #!/bin/bash   # Obtain these keys from the Telstra Developer Portal   CLIENT_KEY=\"your client key\"   CLIENT_SECRET=\"your client secret\"   curl -X POST -H 'Content-Type: application/x-www-form-urlencoded' \\   -d 'grant_type=client_credentials&client_id=$CLIENT_KEY&client_secret=CLIENT_SECRET&scope=NSMS' \\   'https://tapi.telstra.com/v2/oauth/token' 
# noqa: E501 + To generate an OAuth2 Authentication token, pass through your `Client key` and `Client secret` that you received when you registered for the **API Free Trial** Product. The grant_type should be left as `client_credentials` and the scope as `NSMS`. The token will expire in one hour. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True >>> thread = api.auth_token_with_http_info(client_id, client_secret, grant_type, async=True) diff --git a/Telstra_Messaging/api/messaging_api.py b/Telstra_Messaging/api/messaging_api.py index c4c889a..2745326 100644 --- a/Telstra_Messaging/api/messaging_api.py +++ b/Telstra_Messaging/api/messaging_api.py @@ -3,11 +3,10 @@ """ Telstra Messaging API - # Introduction Send and receive SMS and MMS messages globally using Telstra’s enterprise grade Messaging API. It also allows your application to track the delivery status of both sent and received messages. Get your dedicated Australian number, and start sending and receiving messages today. # Features

The Telstra Messaging API provides the features below.
Feature Description
Dedicated Number Provision a mobile number for your account to be used as from address in the API
Send Messages Sending SMS or MMS messages
Receive Messages Telstra will deliver messages sent to a dedicated number or to the notifyURL defined by you
Broadcast Messages Invoke a single API to send a message to a list of number provided in to
Delivery Status Query the delivery status of your messages
Callbacks Provide a notification URL and Telstra will notify your app when messages status changes
Alphanumeric Identifier Differentiate yourself by providing an alphanumeric string in from. This feature is only available on paid plans
Concatenation Send messages up to 1900 characters long and Telstra will automaticaly segment and reassemble them
Reply Request Create a chat session by associating messageId and to number to track responses received from a mobile number. We will store this association for 8 days
Character set Accepts all Unicode characters as part of UTF-8
Bounce-back response See if your SMS hits an unreachable or unallocated number (Australia Only)
Queuing Messaging API will automatically queue and deliver each message at a compliant rate.
Emoji Encoding The API supports the encoding of the full range of emojis. Emojis in the reply messages will be in their UTF-8 format.
# Getting Access to the API

  1. Register at https://dev.telstra.com.
  2. After registration, login to https://dev.telstra.com and navigate to the "My apps" page.
  3. Create your application by clicking the "Add new app" button
  4. Select "API Free Trial" Product when configuring your application. This Product includes the Telstra Messaging API as well as other APIs. Your application will be approved automatically.
  5. There is a maximum of 1000 free messages per developer. Additional messages and features can be purchased from https://dev.telstra.com.
  6. Note your Client key and Client secret as these will be needed to provision a number for your application and for authentication.

Now head over to Getting Started where you can find a postman collection as well as some links to sample apps and SDKs to get you started.

Happy Messaging! # Getting Started

Below are the steps to get started with the Telstra Messaging API.

  1. Generate OAuth2 Token using your Client key and Client secret.
  2. Create Subscription in order to receive a provisioned number.
  3. Send Message to a specific mobile number.

Run in Postman

\"Run

Sample Apps

- Perl Sample App - Happy Chat App - PHP Sample App

SDK repos

- Messaging API - PHP SDK - Messaging API - Python SDK - Messaging API - Ruby SDK - Messaging API - NodeJS SDK - Messaging API - .Net2 SDK - Messaging API - Java SDK # Delivery Notification The API provides several methods for notifying when a message has been delivered to the destination.
  1. When you provision a number there is an opportunity to specify a notifyURL, when the message has been delivered the API will make a call to this URL to advise of the message status. If this is not provided then you can make use the Get Replies API to poll for messages.
  2. If you do not specify a URL you can always call the GET /sms API get the latest replies to the message.
Please note that the notification URLs and the polling call are exclusive. If a notification URL has been set then the polling call will not provide any useful information.

Notification URL Format

When a message has reached its final state, the API will send a POST to the URL that has been previously specified.

Notification URL Format for SMS

{     to: '+61418123456'     sentTimestamp: '2017-03-17T10:05:22+10:00'     receivedTimestamp: '2017-03-17T10:05:23+10:00'     messageId: /cccb284200035236000000000ee9d074019e0301/1261418123456     deliveryStatus: DELIVRD   } 
\\ The fields are:
Field Description
to The number the message was sent to.
receivedTimestamp Time the message was sent to the API.
sentTimestamp Time handling of the message ended.
deliveryStatus The final state of the message.
messageId The same reference that was returned when the original message was sent.
receivedTimestamp Time the message was sent to the API.
Upon receiving this call it is expected that your servers will give a 204 (No Content) response. Anything else will cause the API to reattempt the call 5 minutes later.

Notification URL Format for SMS Replies

{     \"status\": \"RECEIVED\"     \"destinationAddress\": \"+61418123456\"     \"senderAddress\": \"+61421987654\"     \"message\": \"Foo\"             \"sentTimestamp\": \"2018-03-23T12:10:06+10:00\"   }                              
\\ The fields are:
Field Description
status The final state of the message.
destinationAddress The number the message was sent to.
senderAddress The number the message was sent from.
message The sontent of the SMS reply.
sentTimestamp Time handling of the message ended.

Notification URL Format for MMS Replies

{     \"status\": \"RECEIVED\",     \"destinationAddress\": \"+61418123456\",     \"senderAddress\": \"+61421987654\",     \"subject\": \"Foo\",     \"sentTimestamp\": \"2018-03-23T12:15:45+10:00\",     \"envelope\": \"string\",     \"MMSContent\":      [       {         \"type\": \"application/smil\",         \"filename\": \"smil.xml\",         \"payload\": \"string\"       },        {         \"type\": \"image/jpeg\",         \"filename\": \"sample.jpeg\",         \"payload\": \"string\"        }      ]    } 
\\ The fields are:
Field Description
status The final state of the message.
destinationAddress The number the message was sent to.
senderAddress The number the message was sent from.
subject The subject assigned to the message.
sentTimestamp Time handling of the message ended.
envelope Information about about terminal type and originating operator.
MMSContent An array of the actual content of the reply message.
type The content type of the message.
filename The filename for the message content.
payload The content of the message.
# Frequently Asked Questions **Q: Can I send a broadcast message using the Telstra Messging API?** A. Yes. Recipient numbers can be in teh form of an array of strings if a broadcast message needs to be sent.

Notes

View messaging in Swagger UI # noqa: E501 + # Introduction Send and receive SMS and MMS messages globally using Telstra’s enterprise grade Messaging API. It also allows your application to track the delivery status of both sent and received messages. Get your dedicated Australian number, and start sending and receiving messages today. # Features The Telstra Messaging API provides the features below. | Feature | Description | | --- | --- | | `Dedicated Number` | Provision a mobile number for your account to be used as `from` address in the API | | `Send Messages` | Sending SMS or MMS messages | | `Receive Messages` | Telstra will deliver messages sent to a dedicated number or to the `notifyURL` defined by you | | `Broadcast Messages` | Invoke a single API call to send a message to a list of numbers provided in `to` | | `Delivery Status` | Query the delivery status of your messages | | `Callbacks` | Provide a notification URL and Telstra will notify your app when a message status changes | | `Alphanumeric Identifier` | Differentiate yourself by providing an alphanumeric string in `from`. This feature is only available on paid plans | | `Concatenation` | Send messages up to 1900 characters long and Telstra will automaticaly segment and reassemble them | | `Reply Request` | Create a chat session by associating `messageId` and `to` number to track responses received from a mobile number. We will store this association for 8 days | | `Character set` | Accepts all Unicode characters as part of UTF-8 | | `Bounce-back response` | See if your SMS hits an unreachable or unallocated number (Australia Only) | | `Queuing` | Messaging API will automatically queue and deliver each message at a compliant rate. | | `Emoji Encoding` | The API supports the encoding of the full range of emojis. Emojis in the reply messages will be in their UTF-8 format. | ## Delivery Notification or Callbacks The API provides several methods for notifying when a message has been delivered to the destination. 1. When you send a message there is an opportunity to specify a `notifyURL`. Once the message has been delivered the API will make a call to this URL to advise of the message status. 2. If you do not specify a URL you can always call the `GET /status` API to get the status of the message. # Getting Access to the API 1. Register at [https://dev.telstra.com](https://dev.telstra.com). 2. After registration, login to [https://dev.telstra.com](https://dev.telstra.com) and navigate to the **My apps** page. 3. Create your application by clicking the **Add new app** button 4. Select **API Free Trial** Product when configuring your application. This Product includes the Telstra Messaging API as well as other free trial APIs. Your application will be approved automatically. 5. There is a maximum of 1000 free messages per developer. Additional messages and features can be purchased from [https://dev.telstra.com](https://dev.telstra.com). 6. Note your `Client key` and `Client secret` as these will be needed to provision a number for your application and for authentication. Now head over to **Getting Started** where you can find a postman collection as well as some links to sample apps and SDKs to get you started. Happy Messaging! # Frequently Asked Questions **Q: Is creating a subscription via the Provisioning call a required step?** A. Yes. You will only be able to start sending messages if you have a provisioned dedicated number. Use Provisioning to create a dedicated number subscription, or renew your dedicated number if it has expired. **Q: When trying to send an SMS I receive a `400 Bad Request` response. How can I fix this?** A. You need to make sure you have a provisioned dedicated number before you can send an SMS. If you do not have a provisioned dedicated number and you try to send a message via the API, you will get the error below in the response:
{   \"status\":\"400\",   \"code\":\"DELIVERY-IMPOSSIBLE\",   \"message\":\"Invalid \\'from\\' address specified\" }
Use Provisioning to create a dedicated number subscription, or renew your dedicated number if it has expired. **Q: Can I send a broadcast message using the Telstra Messaging API?** A. Yes. Recipient numbers can be in the form of an array of strings if a broadcast message needs to be sent, allowing you to send to multiple mobile numbers in one API call. A sample request body for this will be: `{\"to\":[\"+61412345678\",\"+61487654321\"],\"body\":\"Test Message\"}` **Q: Can I use `Alphanumeric Identifier` from my paid plan via credit card?** A. `Alphanumeric Identifier` is only available on Telstra Account paid plans, not through credit card paid plans. **Q: How long does my dedicated number stay active for?** A. When you provision a dedicated number, by default it will be active for 30-days. You can use the `activeDays` parameter during the provisioning call to increment or decrement the number of days your dedicated number will remain active. **Q: What is the maximum sized MMS that I can send?** A. This will depend on the carrier that will receive the MMS. For Telstra it's up to 2MB, Optus up to 1.5MB and Vodafone only allows up to 500kB. You will need to check with international carriers for thier MMS size limits. **Q: Are SMILs supported by the Messaging API?** A. While there will be no error if you send an MMS with a SMIL presentation, the actual layout or sequence defined in the SMIL may not display as expected because most of the new smartphone devices ignore the SMIL presentation layer. SMIL was used in feature phones which had limited capability and SMIL allowed a *powerpoint type* presentation to be provided. Smartphones now have the capability to display video which is the better option for presentations. It is recommended that MMS messages should just drop the SMIL. **Q: How do I assign a delivery notification or callback URL?** A. You can assign a delivery notification or callback URL by adding the `notifyURL` parameter in the body of the request when you send a message. Once the message has been delivered, a notification will then be posted to this callback URL. **Q: What is the difference between the `notifyURL` parameter in the Provisoning call versus the `notifyURL` parameter in the Send Message call?** A. The `notifyURL` in the Provisoning call will be the URL where replies to the provisioned number will be posted. On the other hand, the `notifyURL` in the Send Message call will be the URL where the delivery notification will be posted, e.g. when an SMS has already been delivered to the recipient. # Getting Started Below are the steps to get started with the Telstra Messaging API. 1. Generate an OAuth2 token using your `Client key` and `Client secret`. 2. Use the Provisioning call to create a subscription and receive a dedicated number. 3. Send a message to a specific mobile number. ## Run in Postman \"Run ## Sample Apps - [Perl Sample App](https://github.com/telstra/MessagingAPI-perl-sample-app) - [Happy Chat App](https://github.com/telstra/messaging-sample-code-happy-chat) - [PHP Sample App](https://github.com/developersteve/telstra-messaging-php) ## SDK Repos - [Messaging API - PHP SDK](https://github.com/telstra/MessagingAPI-SDK-php) - [Messaging API - Python SDK](https://github.com/telstra/MessagingAPI-SDK-python) - [Messaging API - Ruby SDK](https://github.com/telstra/MessagingAPI-SDK-ruby) - [Messaging API - NodeJS SDK](https://github.com/telstra/MessagingAPI-SDK-node) - [Messaging API - .Net2 SDK](https://github.com/telstra/MessagingAPI-SDK-dotnet) - [Messaging API - Java SDK](https://github.com/telstra/MessagingAPI-SDK-Java) ## Blog Posts For more information on the Messaging API, you can read these blog posts: - [Callbacks Part 1](https://dev.telstra.com/content/understanding-messaging-api-callbacks-part-1) - [Callbacks Part 2](https://dev.telstra.com/content/understanding-messaging-api-callbacks-part-2) # noqa: E501 OpenAPI spec version: 2.2.6 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -22,10 +21,10 @@ class MessagingApi(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen """ def __init__(self, api_client=None): @@ -43,7 +42,7 @@ def get_mms_status(self, messageid, **kwargs): # noqa: E501 >>> result = thread.get() :param async bool - :param str messageid: Unique identifier of a message - it is the value returned from a previous POST call to https://api.telstra.com/v2/messages/mms (required) + :param str messageid: Unique identifier of a message - it is the value returned from a previous POST call to https://api.telstra.com/v2/messages/mms (required) :return: list[OutboundPollResponse] If the method is called asynchronously, returns the request thread. @@ -65,7 +64,7 @@ def get_mms_status_with_http_info(self, messageid, **kwargs): # noqa: E501 >>> result = thread.get() :param async bool - :param str messageid: Unique identifier of a message - it is the value returned from a previous POST call to https://api.telstra.com/v2/messages/mms (required) + :param str messageid: Unique identifier of a message - it is the value returned from a previous POST call to https://api.telstra.com/v2/messages/mms (required) :return: list[OutboundPollResponse] If the method is called asynchronously, returns the request thread. @@ -109,10 +108,6 @@ def get_mms_status_with_http_info(self, messageid, **kwargs): # noqa: E501 header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['auth'] # noqa: E501 @@ -135,14 +130,14 @@ def get_mms_status_with_http_info(self, messageid, **kwargs): # noqa: E501 def get_sms_status(self, message_id, **kwargs): # noqa: E501 """Get SMS Status # noqa: E501 - If no notification URL has been specified, it is possible to poll for the message status.
  #!/bin/bash   #!/bin/bash   # Example of how to poll for a message status   AccessToken=\"Consumer Access Token\"   MessageId=\"Previous supplied Message Id, URL encoded\"   curl -X get -H \"Authorization: Bearer $AccessToken\" \\     -H \"Content-Type: application/json\" \\     \"https://tapi.telstra.com/v2/messages/sms/$MessageId\" 
Note that the `MessageId` that appears in the URL must be URL encoded, just copying the `MessageId` as it was supplied when submitting the message may not work. # noqa: E501 + If no notification URL has been specified, it is possible to poll for the message status. Note that the `MessageId` that appears in the URL must be URL encoded. Just copying the `MessageId` as it was supplied when submitting the message may not work. SMS Status with Notification URL --- When a message has reached its final state, the API will send a POST to the URL that has been previously specified.
{     to: '+61418123456'     sentTimestamp: '2017-03-17T10:05:22+10:00'     receivedTimestamp: '2017-03-17T10:05:23+10:00'     messageId: /cccb284200035236000000000ee9d074019e0301/1261418123456     deliveryStatus: DELIVRD   } 
The fields are:
Field Description
to The number the message was sent to.
receivedTimestamp Time the message was sent to the API.
sentTimestamp Time handling of the message ended.
deliveryStatus The final state of the message.
messageId The same reference that was returned when the original message was sent.
receivedTimestamp Time the message was sent to the API.
Upon receiving this call it is expected that your servers will give a 204 (No Content) response. Anything else will cause the API to reattempt the call 5 minutes later. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True >>> thread = api.get_sms_status(message_id, async=True) >>> result = thread.get() :param async bool - :param str message_id: Unique identifier of a message - it is the value returned from a previous POST call to https://api.telstra.com/v2/messages/sms. (required) + :param str message_id: Unique identifier of a message - it is the value returned from a previous POST call to https://api.telstra.com/v2/messages/sms. (required) :return: list[OutboundPollResponse] If the method is called asynchronously, returns the request thread. @@ -157,14 +152,14 @@ def get_sms_status(self, message_id, **kwargs): # noqa: E501 def get_sms_status_with_http_info(self, message_id, **kwargs): # noqa: E501 """Get SMS Status # noqa: E501 - If no notification URL has been specified, it is possible to poll for the message status.
  #!/bin/bash   #!/bin/bash   # Example of how to poll for a message status   AccessToken=\"Consumer Access Token\"   MessageId=\"Previous supplied Message Id, URL encoded\"   curl -X get -H \"Authorization: Bearer $AccessToken\" \\     -H \"Content-Type: application/json\" \\     \"https://tapi.telstra.com/v2/messages/sms/$MessageId\" 
Note that the `MessageId` that appears in the URL must be URL encoded, just copying the `MessageId` as it was supplied when submitting the message may not work. # noqa: E501 + If no notification URL has been specified, it is possible to poll for the message status. Note that the `MessageId` that appears in the URL must be URL encoded. Just copying the `MessageId` as it was supplied when submitting the message may not work. SMS Status with Notification URL --- When a message has reached its final state, the API will send a POST to the URL that has been previously specified.
{     to: '+61418123456'     sentTimestamp: '2017-03-17T10:05:22+10:00'     receivedTimestamp: '2017-03-17T10:05:23+10:00'     messageId: /cccb284200035236000000000ee9d074019e0301/1261418123456     deliveryStatus: DELIVRD   } 
The fields are:
Field Description
to The number the message was sent to.
receivedTimestamp Time the message was sent to the API.
sentTimestamp Time handling of the message ended.
deliveryStatus The final state of the message.
messageId The same reference that was returned when the original message was sent.
receivedTimestamp Time the message was sent to the API.
Upon receiving this call it is expected that your servers will give a 204 (No Content) response. Anything else will cause the API to reattempt the call 5 minutes later. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True >>> thread = api.get_sms_status_with_http_info(message_id, async=True) >>> result = thread.get() :param async bool - :param str message_id: Unique identifier of a message - it is the value returned from a previous POST call to https://api.telstra.com/v2/messages/sms. (required) + :param str message_id: Unique identifier of a message - it is the value returned from a previous POST call to https://api.telstra.com/v2/messages/sms. (required) :return: list[OutboundPollResponse] If the method is called asynchronously, returns the request thread. @@ -208,10 +203,6 @@ def get_sms_status_with_http_info(self, message_id, **kwargs): # noqa: E501 header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['auth'] # noqa: E501 @@ -231,10 +222,97 @@ def get_sms_status_with_http_info(self, message_id, **kwargs): # noqa: E501 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def retrieve_mms_responses(self, **kwargs): # noqa: E501 + """Retrieve MMS Responses # noqa: E501 + + Messages are retrieved one at a time, starting with the earliest response. If the subscription has a `notifyURL`, response messages will be logged there instead. # Notification URL Format for MMS Replies
{   \"status\": \"RECEIVED\",   \"destinationAddress\": \"+61418123456\",   \"senderAddress\": \"+61421987654\",   \"subject\": \"Foo\",   \"sentTimestamp\": \"2018-03-23T12:15:45+10:00\",   \"envelope\": \"string\",   \"MMSContent\":     [       {         \"type\": \"text/plain\",         \"filename\": \"text_1.txt\",         \"payload\": \"string\"       },       {         \"type\": \"image/jpeg\",         \"filename\": \"sample.jpeg\",         \"payload\": \"string\"       }     ] }
The fields are: | Field | Description | | --- | --- | | `status` | The final state of the message. | | `destinationAddress` |The number the message was sent to. | | `senderAddress` | The number the message was sent from. | | `subject` | The subject assigned to the message. | | `sentTimestamp` | Time handling of the message ended. | | `envelope` | Information about about terminal type and originating operator. | | `MMSContent` | An array of the actual content of the reply message. | | `type` | The content type of the message. | | `filename` | The filename for the message content. | | `payload` | The content of the message. | # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.retrieve_mms_responses(async=True) + >>> result = thread.get() + + :param async bool + :return: list[MMSContent] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.retrieve_mms_responses_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.retrieve_mms_responses_with_http_info(**kwargs) # noqa: E501 + return data + + def retrieve_mms_responses_with_http_info(self, **kwargs): # noqa: E501 + """Retrieve MMS Responses # noqa: E501 + + Messages are retrieved one at a time, starting with the earliest response. If the subscription has a `notifyURL`, response messages will be logged there instead. # Notification URL Format for MMS Replies
{   \"status\": \"RECEIVED\",   \"destinationAddress\": \"+61418123456\",   \"senderAddress\": \"+61421987654\",   \"subject\": \"Foo\",   \"sentTimestamp\": \"2018-03-23T12:15:45+10:00\",   \"envelope\": \"string\",   \"MMSContent\":     [       {         \"type\": \"text/plain\",         \"filename\": \"text_1.txt\",         \"payload\": \"string\"       },       {         \"type\": \"image/jpeg\",         \"filename\": \"sample.jpeg\",         \"payload\": \"string\"       }     ] }
The fields are: | Field | Description | | --- | --- | | `status` | The final state of the message. | | `destinationAddress` |The number the message was sent to. | | `senderAddress` | The number the message was sent from. | | `subject` | The subject assigned to the message. | | `sentTimestamp` | Time handling of the message ended. | | `envelope` | Information about about terminal type and originating operator. | | `MMSContent` | An array of the actual content of the reply message. | | `type` | The content type of the message. | | `filename` | The filename for the message content. | | `payload` | The content of the message. | # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.retrieve_mms_responses_with_http_info(async=True) + >>> result = thread.get() + + :param async bool + :return: list[MMSContent] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method retrieve_mms_responses" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['auth'] # noqa: E501 + + return self.api_client.call_api( + '/messages/mms', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[MMSContent]', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def retrieve_sms_responses(self, **kwargs): # noqa: E501 """Retrieve SMS Responses # noqa: E501 - Messages are retrieved one at a time, starting with the earliest response. The API supports the encoding of the full range of emojis in the reply message. The emojis will be in their UTF-8 format. If the subscription has a `notifyURL`, response messages will be logged there instead. # noqa: E501 + Messages are retrieved one at a time, starting with the earliest response. The API supports the encoding of the full range of emojis in the reply message. The emojis will be in their UTF-8 format. If the subscription has a `notifyURL`, response messages will be logged there instead. # Notification URL Format for SMS Response
{   \"to\":\"+61472880123\",   \"from\":\"+61412345678\",   \"body\":\"Foo4\",   \"sentTimestamp\":\"2018-04-20T14:24:35\",   \"messageId\":\"DMASApiA0000000146\" }
The fields are: | Field | Description | | --- |--- | | `to` | The number the message was sent to. | | `from` | The number the message was sent from. | | `body` | The content of the SMS response. | | `sentTimestamp` | Time handling of the message ended. | | `messageId` | The ID assigned to the message. | # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True >>> thread = api.retrieve_sms_responses(async=True) @@ -255,7 +333,7 @@ def retrieve_sms_responses(self, **kwargs): # noqa: E501 def retrieve_sms_responses_with_http_info(self, **kwargs): # noqa: E501 """Retrieve SMS Responses # noqa: E501 - Messages are retrieved one at a time, starting with the earliest response. The API supports the encoding of the full range of emojis in the reply message. The emojis will be in their UTF-8 format. If the subscription has a `notifyURL`, response messages will be logged there instead. # noqa: E501 + Messages are retrieved one at a time, starting with the earliest response. The API supports the encoding of the full range of emojis in the reply message. The emojis will be in their UTF-8 format. If the subscription has a `notifyURL`, response messages will be logged there instead. # Notification URL Format for SMS Response
{   \"to\":\"+61472880123\",   \"from\":\"+61412345678\",   \"body\":\"Foo4\",   \"sentTimestamp\":\"2018-04-20T14:24:35\",   \"messageId\":\"DMASApiA0000000146\" }
The fields are: | Field | Description | | --- |--- | | `to` | The number the message was sent to. | | `from` | The number the message was sent from. | | `body` | The content of the SMS response. | | `sentTimestamp` | Time handling of the message ended. | | `messageId` | The ID assigned to the message. | # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True >>> thread = api.retrieve_sms_responses_with_http_info(async=True) @@ -299,10 +377,6 @@ def retrieve_sms_responses_with_http_info(self, **kwargs): # noqa: E501 header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['auth'] # noqa: E501 @@ -322,45 +396,49 @@ def retrieve_sms_responses_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def send_mms(self, body, **kwargs): # noqa: E501 + def send_mms(self, send_mms_request, **kwargs): # noqa: E501 """Send MMS # noqa: E501 Send MMS # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True - >>> thread = api.send_mms(body, async=True) + >>> thread = api.send_mms(send_mms_request, async=True) >>> result = thread.get() :param async bool - :param SendMmsRequest body: A JSON or XML payload containing the recipient's phone number and MMS message.The recipient number should be in the format '04xxxxxxxx' where x is a digit (required) + :param SendMmsRequest send_mms_request: A JSON or XML payload containing the recipient's phone number and MMS message. +The recipient number should be in the format '04xxxxxxxx' where x is a digit. + (required) :return: MessageSentResponse If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async'): - return self.send_mms_with_http_info(body, **kwargs) # noqa: E501 + return self.send_mms_with_http_info(send_mms_request, **kwargs) # noqa: E501 else: - (data) = self.send_mms_with_http_info(body, **kwargs) # noqa: E501 + (data) = self.send_mms_with_http_info(send_mms_request, **kwargs) # noqa: E501 return data - def send_mms_with_http_info(self, body, **kwargs): # noqa: E501 + def send_mms_with_http_info(self, send_mms_request, **kwargs): # noqa: E501 """Send MMS # noqa: E501 Send MMS # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True - >>> thread = api.send_mms_with_http_info(body, async=True) + >>> thread = api.send_mms_with_http_info(send_mms_request, async=True) >>> result = thread.get() :param async bool - :param SendMmsRequest body: A JSON or XML payload containing the recipient's phone number and MMS message.The recipient number should be in the format '04xxxxxxxx' where x is a digit (required) + :param SendMmsRequest send_mms_request: A JSON or XML payload containing the recipient's phone number and MMS message. +The recipient number should be in the format '04xxxxxxxx' where x is a digit. + (required) :return: MessageSentResponse If the method is called asynchronously, returns the request thread. """ - all_params = ['body'] # noqa: E501 + all_params = ['send_mms_request'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -375,10 +453,10 @@ def send_mms_with_http_info(self, body, **kwargs): # noqa: E501 ) params[key] = val del params['kwargs'] - # verify the required parameter 'body' is set - if ('body' not in params or - params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `send_mms`") # noqa: E501 + # verify the required parameter 'send_mms_request' is set + if ('send_mms_request' not in params or + params['send_mms_request'] is None): + raise ValueError("Missing the required parameter `send_mms_request` when calling `send_mms`") # noqa: E501 collection_formats = {} @@ -392,8 +470,8 @@ def send_mms_with_http_info(self, body, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] + if 'send_mms_request' in params: + body_params = params['send_mms_request'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -421,45 +499,49 @@ def send_mms_with_http_info(self, body, **kwargs): # noqa: E501 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def send_sms(self, payload, **kwargs): # noqa: E501 + def send_sms(self, send_sms_request, **kwargs): # noqa: E501 """Send SMS # noqa: E501 - Send an SMS Message to a single or multiple mobile number/s.

Send message to a single number:

  #!/bin/bash   # Use the Messaging API-v2 to send an SMS   # Note: only to: and body: are required   AccessToken=\"Access Token\"   Dest=\"Destination number\"   curl -X POST -H \"Authorization: Bearer $AccessToken\" -H \"Content-Type: application/json\" -d \"{     \\\"to\\\":\\\"$Dest\\\",     \\\"body\\\":\\\"Test Message\\\",     \\\"from\\\": \\\"+61412345678\\\",     \\\"validity\\\": 5,     \\\"scheduledDelivery\\\": 1,     \\\"notifyURL\\\": \\\"\\\",     \\\"replyRequest\\\": false     \\\"priority\\\": true   }\" \"https://tapi.telstra.com/v2/messages/sms\" 
\\

Send message to multiple numbers:

 #!/bin/bash   # Use the Messaging API to send an SMS   AccessToken=\"Access Token\"   Dest=\"Destination number\"   curl -X post -H \"Authorization: Bearer $AccessToken\" \\     -H \"Content-Type: application/json\" \\     -d '{ \"to\":\"$dest1, $dest2, $dest3\", \"body\":\"Test Message\" }' \\     https://tapi.telstra.com/v2/messages/sms   
  # noqa: E501
+        Send an SMS Message to a single or multiple mobile number/s.   # noqa: E501
         This method makes a synchronous HTTP request by default. To make an
         asynchronous HTTP request, please pass async=True
-        >>> thread = api.send_sms(payload, async=True)
+        >>> thread = api.send_sms(send_sms_request, async=True)
         >>> result = thread.get()
 
         :param async bool
-        :param SendSMSRequest payload: A JSON or XML payload containing the recipient's phone number and text message.  This number can be in international format if preceeded by a ‘+’ or in national format ('04xxxxxxxx') where x is a digit. (required)
+        :param SendSMSRequest send_sms_request: A JSON or XML payload containing the recipient's phone number and text message.
+This number can be in international format if preceeded by a ‘+’ or in national format ('04xxxxxxxx') where x is a digit.
+ (required)
         :return: MessageSentResponse
                  If the method is called asynchronously,
                  returns the request thread.
         """
         kwargs['_return_http_data_only'] = True
         if kwargs.get('async'):
-            return self.send_sms_with_http_info(payload, **kwargs)  # noqa: E501
+            return self.send_sms_with_http_info(send_sms_request, **kwargs)  # noqa: E501
         else:
-            (data) = self.send_sms_with_http_info(payload, **kwargs)  # noqa: E501
+            (data) = self.send_sms_with_http_info(send_sms_request, **kwargs)  # noqa: E501
             return data
 
-    def send_sms_with_http_info(self, payload, **kwargs):  # noqa: E501
+    def send_sms_with_http_info(self, send_sms_request, **kwargs):  # noqa: E501
         """Send SMS  # noqa: E501
 
-        Send an SMS Message to a single or multiple mobile number/s.  

Send message to a single number:

  #!/bin/bash   # Use the Messaging API-v2 to send an SMS   # Note: only to: and body: are required   AccessToken=\"Access Token\"   Dest=\"Destination number\"   curl -X POST -H \"Authorization: Bearer $AccessToken\" -H \"Content-Type: application/json\" -d \"{     \\\"to\\\":\\\"$Dest\\\",     \\\"body\\\":\\\"Test Message\\\",     \\\"from\\\": \\\"+61412345678\\\",     \\\"validity\\\": 5,     \\\"scheduledDelivery\\\": 1,     \\\"notifyURL\\\": \\\"\\\",     \\\"replyRequest\\\": false     \\\"priority\\\": true   }\" \"https://tapi.telstra.com/v2/messages/sms\" 
\\

Send message to multiple numbers:

 #!/bin/bash   # Use the Messaging API to send an SMS   AccessToken=\"Access Token\"   Dest=\"Destination number\"   curl -X post -H \"Authorization: Bearer $AccessToken\" \\     -H \"Content-Type: application/json\" \\     -d '{ \"to\":\"$dest1, $dest2, $dest3\", \"body\":\"Test Message\" }' \\     https://tapi.telstra.com/v2/messages/sms   
  # noqa: E501
+        Send an SMS Message to a single or multiple mobile number/s.   # noqa: E501
         This method makes a synchronous HTTP request by default. To make an
         asynchronous HTTP request, please pass async=True
-        >>> thread = api.send_sms_with_http_info(payload, async=True)
+        >>> thread = api.send_sms_with_http_info(send_sms_request, async=True)
         >>> result = thread.get()
 
         :param async bool
-        :param SendSMSRequest payload: A JSON or XML payload containing the recipient's phone number and text message.  This number can be in international format if preceeded by a ‘+’ or in national format ('04xxxxxxxx') where x is a digit. (required)
+        :param SendSMSRequest send_sms_request: A JSON or XML payload containing the recipient's phone number and text message.
+This number can be in international format if preceeded by a ‘+’ or in national format ('04xxxxxxxx') where x is a digit.
+ (required)
         :return: MessageSentResponse
                  If the method is called asynchronously,
                  returns the request thread.
         """
 
-        all_params = ['payload']  # noqa: E501
+        all_params = ['send_sms_request']  # noqa: E501
         all_params.append('async')
         all_params.append('_return_http_data_only')
         all_params.append('_preload_content')
@@ -474,10 +556,10 @@ def send_sms_with_http_info(self, payload, **kwargs):  # noqa: E501
                 )
             params[key] = val
         del params['kwargs']
-        # verify the required parameter 'payload' is set
-        if ('payload' not in params or
-                params['payload'] is None):
-            raise ValueError("Missing the required parameter `payload` when calling `send_sms`")  # noqa: E501
+        # verify the required parameter 'send_sms_request' is set
+        if ('send_sms_request' not in params or
+                params['send_sms_request'] is None):
+            raise ValueError("Missing the required parameter `send_sms_request` when calling `send_sms`")  # noqa: E501
 
         collection_formats = {}
 
@@ -491,8 +573,8 @@ def send_sms_with_http_info(self, payload, **kwargs):  # noqa: E501
         local_var_files = {}
 
         body_params = None
-        if 'payload' in params:
-            body_params = params['payload']
+        if 'send_sms_request' in params:
+            body_params = params['send_sms_request']
         # HTTP header `Accept`
         header_params['Accept'] = self.api_client.select_header_accept(
             ['application/json'])  # noqa: E501
diff --git a/Telstra_Messaging/api/provisioning_api.py b/Telstra_Messaging/api/provisioning_api.py
index 71e7503..4b9436c 100644
--- a/Telstra_Messaging/api/provisioning_api.py
+++ b/Telstra_Messaging/api/provisioning_api.py
@@ -3,11 +3,10 @@
 """
     Telstra Messaging API
 
-     # Introduction  Send and receive SMS and MMS messages globally using Telstra’s enterprise grade Messaging API. It also allows your application to track the delivery status of both sent and received messages. Get your dedicated Australian number, and start sending and receiving messages today.  # Features  

The Telstra Messaging API provides the features below.
Feature Description
Dedicated Number Provision a mobile number for your account to be used as from address in the API
Send Messages Sending SMS or MMS messages
Receive Messages Telstra will deliver messages sent to a dedicated number or to the notifyURL defined by you
Broadcast Messages Invoke a single API to send a message to a list of number provided in to
Delivery Status Query the delivery status of your messages
Callbacks Provide a notification URL and Telstra will notify your app when messages status changes
Alphanumeric Identifier Differentiate yourself by providing an alphanumeric string in from. This feature is only available on paid plans
Concatenation Send messages up to 1900 characters long and Telstra will automaticaly segment and reassemble them
Reply Request Create a chat session by associating messageId and to number to track responses received from a mobile number. We will store this association for 8 days
Character set Accepts all Unicode characters as part of UTF-8
Bounce-back response See if your SMS hits an unreachable or unallocated number (Australia Only)
Queuing Messaging API will automatically queue and deliver each message at a compliant rate.
Emoji Encoding The API supports the encoding of the full range of emojis. Emojis in the reply messages will be in their UTF-8 format.
# Getting Access to the API

  1. Register at https://dev.telstra.com.
  2. After registration, login to https://dev.telstra.com and navigate to the "My apps" page.
  3. Create your application by clicking the "Add new app" button
  4. Select "API Free Trial" Product when configuring your application. This Product includes the Telstra Messaging API as well as other APIs. Your application will be approved automatically.
  5. There is a maximum of 1000 free messages per developer. Additional messages and features can be purchased from https://dev.telstra.com.
  6. Note your Client key and Client secret as these will be needed to provision a number for your application and for authentication.

Now head over to Getting Started where you can find a postman collection as well as some links to sample apps and SDKs to get you started.

Happy Messaging! # Getting Started

Below are the steps to get started with the Telstra Messaging API.

  1. Generate OAuth2 Token using your Client key and Client secret.
  2. Create Subscription in order to receive a provisioned number.
  3. Send Message to a specific mobile number.

Run in Postman

\"Run

Sample Apps

- Perl Sample App - Happy Chat App - PHP Sample App

SDK repos

- Messaging API - PHP SDK - Messaging API - Python SDK - Messaging API - Ruby SDK - Messaging API - NodeJS SDK - Messaging API - .Net2 SDK - Messaging API - Java SDK # Delivery Notification The API provides several methods for notifying when a message has been delivered to the destination.
  1. When you provision a number there is an opportunity to specify a notifyURL, when the message has been delivered the API will make a call to this URL to advise of the message status. If this is not provided then you can make use the Get Replies API to poll for messages.
  2. If you do not specify a URL you can always call the GET /sms API get the latest replies to the message.
Please note that the notification URLs and the polling call are exclusive. If a notification URL has been set then the polling call will not provide any useful information.

Notification URL Format

When a message has reached its final state, the API will send a POST to the URL that has been previously specified.

Notification URL Format for SMS

{     to: '+61418123456'     sentTimestamp: '2017-03-17T10:05:22+10:00'     receivedTimestamp: '2017-03-17T10:05:23+10:00'     messageId: /cccb284200035236000000000ee9d074019e0301/1261418123456     deliveryStatus: DELIVRD   } 
\\ The fields are:
Field Description
to The number the message was sent to.
receivedTimestamp Time the message was sent to the API.
sentTimestamp Time handling of the message ended.
deliveryStatus The final state of the message.
messageId The same reference that was returned when the original message was sent.
receivedTimestamp Time the message was sent to the API.
Upon receiving this call it is expected that your servers will give a 204 (No Content) response. Anything else will cause the API to reattempt the call 5 minutes later.

Notification URL Format for SMS Replies

{     \"status\": \"RECEIVED\"     \"destinationAddress\": \"+61418123456\"     \"senderAddress\": \"+61421987654\"     \"message\": \"Foo\"             \"sentTimestamp\": \"2018-03-23T12:10:06+10:00\"   }                              
\\ The fields are:
Field Description
status The final state of the message.
destinationAddress The number the message was sent to.
senderAddress The number the message was sent from.
message The sontent of the SMS reply.
sentTimestamp Time handling of the message ended.

Notification URL Format for MMS Replies

{     \"status\": \"RECEIVED\",     \"destinationAddress\": \"+61418123456\",     \"senderAddress\": \"+61421987654\",     \"subject\": \"Foo\",     \"sentTimestamp\": \"2018-03-23T12:15:45+10:00\",     \"envelope\": \"string\",     \"MMSContent\":      [       {         \"type\": \"application/smil\",         \"filename\": \"smil.xml\",         \"payload\": \"string\"       },        {         \"type\": \"image/jpeg\",         \"filename\": \"sample.jpeg\",         \"payload\": \"string\"        }      ]    } 
\\ The fields are:
Field Description
status The final state of the message.
destinationAddress The number the message was sent to.
senderAddress The number the message was sent from.
subject The subject assigned to the message.
sentTimestamp Time handling of the message ended.
envelope Information about about terminal type and originating operator.
MMSContent An array of the actual content of the reply message.
type The content type of the message.
filename The filename for the message content.
payload The content of the message.
# Frequently Asked Questions **Q: Can I send a broadcast message using the Telstra Messging API?** A. Yes. Recipient numbers can be in teh form of an array of strings if a broadcast message needs to be sent.

Notes

View messaging in Swagger UI # noqa: E501 + # Introduction Send and receive SMS and MMS messages globally using Telstra’s enterprise grade Messaging API. It also allows your application to track the delivery status of both sent and received messages. Get your dedicated Australian number, and start sending and receiving messages today. # Features The Telstra Messaging API provides the features below. | Feature | Description | | --- | --- | | `Dedicated Number` | Provision a mobile number for your account to be used as `from` address in the API | | `Send Messages` | Sending SMS or MMS messages | | `Receive Messages` | Telstra will deliver messages sent to a dedicated number or to the `notifyURL` defined by you | | `Broadcast Messages` | Invoke a single API call to send a message to a list of numbers provided in `to` | | `Delivery Status` | Query the delivery status of your messages | | `Callbacks` | Provide a notification URL and Telstra will notify your app when a message status changes | | `Alphanumeric Identifier` | Differentiate yourself by providing an alphanumeric string in `from`. This feature is only available on paid plans | | `Concatenation` | Send messages up to 1900 characters long and Telstra will automaticaly segment and reassemble them | | `Reply Request` | Create a chat session by associating `messageId` and `to` number to track responses received from a mobile number. We will store this association for 8 days | | `Character set` | Accepts all Unicode characters as part of UTF-8 | | `Bounce-back response` | See if your SMS hits an unreachable or unallocated number (Australia Only) | | `Queuing` | Messaging API will automatically queue and deliver each message at a compliant rate. | | `Emoji Encoding` | The API supports the encoding of the full range of emojis. Emojis in the reply messages will be in their UTF-8 format. | ## Delivery Notification or Callbacks The API provides several methods for notifying when a message has been delivered to the destination. 1. When you send a message there is an opportunity to specify a `notifyURL`. Once the message has been delivered the API will make a call to this URL to advise of the message status. 2. If you do not specify a URL you can always call the `GET /status` API to get the status of the message. # Getting Access to the API 1. Register at [https://dev.telstra.com](https://dev.telstra.com). 2. After registration, login to [https://dev.telstra.com](https://dev.telstra.com) and navigate to the **My apps** page. 3. Create your application by clicking the **Add new app** button 4. Select **API Free Trial** Product when configuring your application. This Product includes the Telstra Messaging API as well as other free trial APIs. Your application will be approved automatically. 5. There is a maximum of 1000 free messages per developer. Additional messages and features can be purchased from [https://dev.telstra.com](https://dev.telstra.com). 6. Note your `Client key` and `Client secret` as these will be needed to provision a number for your application and for authentication. Now head over to **Getting Started** where you can find a postman collection as well as some links to sample apps and SDKs to get you started. Happy Messaging! # Frequently Asked Questions **Q: Is creating a subscription via the Provisioning call a required step?** A. Yes. You will only be able to start sending messages if you have a provisioned dedicated number. Use Provisioning to create a dedicated number subscription, or renew your dedicated number if it has expired. **Q: When trying to send an SMS I receive a `400 Bad Request` response. How can I fix this?** A. You need to make sure you have a provisioned dedicated number before you can send an SMS. If you do not have a provisioned dedicated number and you try to send a message via the API, you will get the error below in the response:
{   \"status\":\"400\",   \"code\":\"DELIVERY-IMPOSSIBLE\",   \"message\":\"Invalid \\'from\\' address specified\" }
Use Provisioning to create a dedicated number subscription, or renew your dedicated number if it has expired. **Q: Can I send a broadcast message using the Telstra Messaging API?** A. Yes. Recipient numbers can be in the form of an array of strings if a broadcast message needs to be sent, allowing you to send to multiple mobile numbers in one API call. A sample request body for this will be: `{\"to\":[\"+61412345678\",\"+61487654321\"],\"body\":\"Test Message\"}` **Q: Can I use `Alphanumeric Identifier` from my paid plan via credit card?** A. `Alphanumeric Identifier` is only available on Telstra Account paid plans, not through credit card paid plans. **Q: How long does my dedicated number stay active for?** A. When you provision a dedicated number, by default it will be active for 30-days. You can use the `activeDays` parameter during the provisioning call to increment or decrement the number of days your dedicated number will remain active. **Q: What is the maximum sized MMS that I can send?** A. This will depend on the carrier that will receive the MMS. For Telstra it's up to 2MB, Optus up to 1.5MB and Vodafone only allows up to 500kB. You will need to check with international carriers for thier MMS size limits. **Q: Are SMILs supported by the Messaging API?** A. While there will be no error if you send an MMS with a SMIL presentation, the actual layout or sequence defined in the SMIL may not display as expected because most of the new smartphone devices ignore the SMIL presentation layer. SMIL was used in feature phones which had limited capability and SMIL allowed a *powerpoint type* presentation to be provided. Smartphones now have the capability to display video which is the better option for presentations. It is recommended that MMS messages should just drop the SMIL. **Q: How do I assign a delivery notification or callback URL?** A. You can assign a delivery notification or callback URL by adding the `notifyURL` parameter in the body of the request when you send a message. Once the message has been delivered, a notification will then be posted to this callback URL. **Q: What is the difference between the `notifyURL` parameter in the Provisoning call versus the `notifyURL` parameter in the Send Message call?** A. The `notifyURL` in the Provisoning call will be the URL where replies to the provisioned number will be posted. On the other hand, the `notifyURL` in the Send Message call will be the URL where the delivery notification will be posted, e.g. when an SMS has already been delivered to the recipient. # Getting Started Below are the steps to get started with the Telstra Messaging API. 1. Generate an OAuth2 token using your `Client key` and `Client secret`. 2. Use the Provisioning call to create a subscription and receive a dedicated number. 3. Send a message to a specific mobile number. ## Run in Postman \"Run ## Sample Apps - [Perl Sample App](https://github.com/telstra/MessagingAPI-perl-sample-app) - [Happy Chat App](https://github.com/telstra/messaging-sample-code-happy-chat) - [PHP Sample App](https://github.com/developersteve/telstra-messaging-php) ## SDK Repos - [Messaging API - PHP SDK](https://github.com/telstra/MessagingAPI-SDK-php) - [Messaging API - Python SDK](https://github.com/telstra/MessagingAPI-SDK-python) - [Messaging API - Ruby SDK](https://github.com/telstra/MessagingAPI-SDK-ruby) - [Messaging API - NodeJS SDK](https://github.com/telstra/MessagingAPI-SDK-node) - [Messaging API - .Net2 SDK](https://github.com/telstra/MessagingAPI-SDK-dotnet) - [Messaging API - Java SDK](https://github.com/telstra/MessagingAPI-SDK-Java) ## Blog Posts For more information on the Messaging API, you can read these blog posts: - [Callbacks Part 1](https://dev.telstra.com/content/understanding-messaging-api-callbacks-part-1) - [Callbacks Part 2](https://dev.telstra.com/content/understanding-messaging-api-callbacks-part-2) # noqa: E501 OpenAPI spec version: 2.2.6 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -22,10 +21,10 @@ class ProvisioningApi(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen """ def __init__(self, api_client=None): @@ -33,45 +32,45 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def create_subscription(self, body, **kwargs): # noqa: E501 + def create_subscription(self, provision_number_request, **kwargs): # noqa: E501 """Create Subscription # noqa: E501 - Invoke the provisioning API to get a dedicated mobile number for an account or application.
   #!/bin/bash   curl -X POST \\   https://tapi.telstra.com/v2/messages/provisioning/subscriptions \\   -H 'authorization: Bearer $ACCESS_TOKEN' \\   -H 'cache-control: no-cache' \\   -H 'content-type: application/json' \\   -d '{   \"activeDays\":30,   \"notifyURL\":\"http://example.com/callback\",   \"callbackData\":     {       \"anything\":\"some data\"     }   }' 
# noqa: E501 + Invoke the provisioning API to get a dedicated mobile number for an account or application. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True - >>> thread = api.create_subscription(body, async=True) + >>> thread = api.create_subscription(provision_number_request, async=True) >>> result = thread.get() :param async bool - :param ProvisionNumberRequest body: A JSON payload containing the required attributes (required) + :param ProvisionNumberRequest provision_number_request: A JSON payload containing the required attributes (required) :return: ProvisionNumberResponse If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async'): - return self.create_subscription_with_http_info(body, **kwargs) # noqa: E501 + return self.create_subscription_with_http_info(provision_number_request, **kwargs) # noqa: E501 else: - (data) = self.create_subscription_with_http_info(body, **kwargs) # noqa: E501 + (data) = self.create_subscription_with_http_info(provision_number_request, **kwargs) # noqa: E501 return data - def create_subscription_with_http_info(self, body, **kwargs): # noqa: E501 + def create_subscription_with_http_info(self, provision_number_request, **kwargs): # noqa: E501 """Create Subscription # noqa: E501 - Invoke the provisioning API to get a dedicated mobile number for an account or application.
   #!/bin/bash   curl -X POST \\   https://tapi.telstra.com/v2/messages/provisioning/subscriptions \\   -H 'authorization: Bearer $ACCESS_TOKEN' \\   -H 'cache-control: no-cache' \\   -H 'content-type: application/json' \\   -d '{   \"activeDays\":30,   \"notifyURL\":\"http://example.com/callback\",   \"callbackData\":     {       \"anything\":\"some data\"     }   }' 
# noqa: E501 + Invoke the provisioning API to get a dedicated mobile number for an account or application. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True - >>> thread = api.create_subscription_with_http_info(body, async=True) + >>> thread = api.create_subscription_with_http_info(provision_number_request, async=True) >>> result = thread.get() :param async bool - :param ProvisionNumberRequest body: A JSON payload containing the required attributes (required) + :param ProvisionNumberRequest provision_number_request: A JSON payload containing the required attributes (required) :return: ProvisionNumberResponse If the method is called asynchronously, returns the request thread. """ - all_params = ['body'] # noqa: E501 + all_params = ['provision_number_request'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -86,10 +85,10 @@ def create_subscription_with_http_info(self, body, **kwargs): # noqa: E501 ) params[key] = val del params['kwargs'] - # verify the required parameter 'body' is set - if ('body' not in params or - params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `create_subscription`") # noqa: E501 + # verify the required parameter 'provision_number_request' is set + if ('provision_number_request' not in params or + params['provision_number_request'] is None): + raise ValueError("Missing the required parameter `provision_number_request` when calling `create_subscription`") # noqa: E501 collection_formats = {} @@ -103,8 +102,8 @@ def create_subscription_with_http_info(self, body, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] + if 'provision_number_request' in params: + body_params = params['provision_number_request'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -132,45 +131,45 @@ def create_subscription_with_http_info(self, body, **kwargs): # noqa: E501 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def delete_subscription(self, body, **kwargs): # noqa: E501 + def delete_subscription(self, delete_number_request, **kwargs): # noqa: E501 """Delete Subscription # noqa: E501 - Delete a mobile number subscription from an account # noqa: E501 + Delete a mobile number subscription from an account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True - >>> thread = api.delete_subscription(body, async=True) + >>> thread = api.delete_subscription(delete_number_request, async=True) >>> result = thread.get() :param async bool - :param DeleteNumberRequest body: EmptyArr (required) + :param DeleteNumberRequest delete_number_request: EmptyArr (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async'): - return self.delete_subscription_with_http_info(body, **kwargs) # noqa: E501 + return self.delete_subscription_with_http_info(delete_number_request, **kwargs) # noqa: E501 else: - (data) = self.delete_subscription_with_http_info(body, **kwargs) # noqa: E501 + (data) = self.delete_subscription_with_http_info(delete_number_request, **kwargs) # noqa: E501 return data - def delete_subscription_with_http_info(self, body, **kwargs): # noqa: E501 + def delete_subscription_with_http_info(self, delete_number_request, **kwargs): # noqa: E501 """Delete Subscription # noqa: E501 - Delete a mobile number subscription from an account # noqa: E501 + Delete a mobile number subscription from an account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True - >>> thread = api.delete_subscription_with_http_info(body, async=True) + >>> thread = api.delete_subscription_with_http_info(delete_number_request, async=True) >>> result = thread.get() :param async bool - :param DeleteNumberRequest body: EmptyArr (required) + :param DeleteNumberRequest delete_number_request: EmptyArr (required) :return: None If the method is called asynchronously, returns the request thread. """ - all_params = ['body'] # noqa: E501 + all_params = ['delete_number_request'] # noqa: E501 all_params.append('async') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -185,10 +184,10 @@ def delete_subscription_with_http_info(self, body, **kwargs): # noqa: E501 ) params[key] = val del params['kwargs'] - # verify the required parameter 'body' is set - if ('body' not in params or - params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `delete_subscription`") # noqa: E501 + # verify the required parameter 'delete_number_request' is set + if ('delete_number_request' not in params or + params['delete_number_request'] is None): + raise ValueError("Missing the required parameter `delete_number_request` when calling `delete_subscription`") # noqa: E501 collection_formats = {} @@ -202,12 +201,8 @@ def delete_subscription_with_http_info(self, body, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - + if 'delete_number_request' in params: + body_params = params['delete_number_request'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 @@ -234,7 +229,7 @@ def delete_subscription_with_http_info(self, body, **kwargs): # noqa: E501 def get_subscription(self, **kwargs): # noqa: E501 """Get Subscription # noqa: E501 - Get mobile number subscription for an account # noqa: E501 + Get mobile number subscription for an account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True >>> thread = api.get_subscription(async=True) @@ -255,7 +250,7 @@ def get_subscription(self, **kwargs): # noqa: E501 def get_subscription_with_http_info(self, **kwargs): # noqa: E501 """Get Subscription # noqa: E501 - Get mobile number subscription for an account # noqa: E501 + Get mobile number subscription for an account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True >>> thread = api.get_subscription_with_http_info(async=True) @@ -299,10 +294,6 @@ def get_subscription_with_http_info(self, **kwargs): # noqa: E501 header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['auth'] # noqa: E501 diff --git a/Telstra_Messaging/api_client.py b/Telstra_Messaging/api_client.py index a4d5155..2d26060 100644 --- a/Telstra_Messaging/api_client.py +++ b/Telstra_Messaging/api_client.py @@ -2,11 +2,10 @@ """ Telstra Messaging API - # Introduction Send and receive SMS and MMS messages globally using Telstra’s enterprise grade Messaging API. It also allows your application to track the delivery status of both sent and received messages. Get your dedicated Australian number, and start sending and receiving messages today. # Features

The Telstra Messaging API provides the features below.
Feature Description
Dedicated Number Provision a mobile number for your account to be used as from address in the API
Send Messages Sending SMS or MMS messages
Receive Messages Telstra will deliver messages sent to a dedicated number or to the notifyURL defined by you
Broadcast Messages Invoke a single API to send a message to a list of number provided in to
Delivery Status Query the delivery status of your messages
Callbacks Provide a notification URL and Telstra will notify your app when messages status changes
Alphanumeric Identifier Differentiate yourself by providing an alphanumeric string in from. This feature is only available on paid plans
Concatenation Send messages up to 1900 characters long and Telstra will automaticaly segment and reassemble them
Reply Request Create a chat session by associating messageId and to number to track responses received from a mobile number. We will store this association for 8 days
Character set Accepts all Unicode characters as part of UTF-8
Bounce-back response See if your SMS hits an unreachable or unallocated number (Australia Only)
Queuing Messaging API will automatically queue and deliver each message at a compliant rate.
Emoji Encoding The API supports the encoding of the full range of emojis. Emojis in the reply messages will be in their UTF-8 format.
# Getting Access to the API

  1. Register at https://dev.telstra.com.
  2. After registration, login to https://dev.telstra.com and navigate to the "My apps" page.
  3. Create your application by clicking the "Add new app" button
  4. Select "API Free Trial" Product when configuring your application. This Product includes the Telstra Messaging API as well as other APIs. Your application will be approved automatically.
  5. There is a maximum of 1000 free messages per developer. Additional messages and features can be purchased from https://dev.telstra.com.
  6. Note your Client key and Client secret as these will be needed to provision a number for your application and for authentication.

Now head over to Getting Started where you can find a postman collection as well as some links to sample apps and SDKs to get you started.

Happy Messaging! # Getting Started

Below are the steps to get started with the Telstra Messaging API.

  1. Generate OAuth2 Token using your Client key and Client secret.
  2. Create Subscription in order to receive a provisioned number.
  3. Send Message to a specific mobile number.

Run in Postman

\"Run

Sample Apps

- Perl Sample App - Happy Chat App - PHP Sample App

SDK repos

- Messaging API - PHP SDK - Messaging API - Python SDK - Messaging API - Ruby SDK - Messaging API - NodeJS SDK - Messaging API - .Net2 SDK - Messaging API - Java SDK # Delivery Notification The API provides several methods for notifying when a message has been delivered to the destination.
  1. When you provision a number there is an opportunity to specify a notifyURL, when the message has been delivered the API will make a call to this URL to advise of the message status. If this is not provided then you can make use the Get Replies API to poll for messages.
  2. If you do not specify a URL you can always call the GET /sms API get the latest replies to the message.
Please note that the notification URLs and the polling call are exclusive. If a notification URL has been set then the polling call will not provide any useful information.

Notification URL Format

When a message has reached its final state, the API will send a POST to the URL that has been previously specified.

Notification URL Format for SMS

{     to: '+61418123456'     sentTimestamp: '2017-03-17T10:05:22+10:00'     receivedTimestamp: '2017-03-17T10:05:23+10:00'     messageId: /cccb284200035236000000000ee9d074019e0301/1261418123456     deliveryStatus: DELIVRD   } 
\\ The fields are:
Field Description
to The number the message was sent to.
receivedTimestamp Time the message was sent to the API.
sentTimestamp Time handling of the message ended.
deliveryStatus The final state of the message.
messageId The same reference that was returned when the original message was sent.
receivedTimestamp Time the message was sent to the API.
Upon receiving this call it is expected that your servers will give a 204 (No Content) response. Anything else will cause the API to reattempt the call 5 minutes later.

Notification URL Format for SMS Replies

{     \"status\": \"RECEIVED\"     \"destinationAddress\": \"+61418123456\"     \"senderAddress\": \"+61421987654\"     \"message\": \"Foo\"             \"sentTimestamp\": \"2018-03-23T12:10:06+10:00\"   }                              
\\ The fields are:
Field Description
status The final state of the message.
destinationAddress The number the message was sent to.
senderAddress The number the message was sent from.
message The sontent of the SMS reply.
sentTimestamp Time handling of the message ended.

Notification URL Format for MMS Replies

{     \"status\": \"RECEIVED\",     \"destinationAddress\": \"+61418123456\",     \"senderAddress\": \"+61421987654\",     \"subject\": \"Foo\",     \"sentTimestamp\": \"2018-03-23T12:15:45+10:00\",     \"envelope\": \"string\",     \"MMSContent\":      [       {         \"type\": \"application/smil\",         \"filename\": \"smil.xml\",         \"payload\": \"string\"       },        {         \"type\": \"image/jpeg\",         \"filename\": \"sample.jpeg\",         \"payload\": \"string\"        }      ]    } 
\\ The fields are:
Field Description
status The final state of the message.
destinationAddress The number the message was sent to.
senderAddress The number the message was sent from.
subject The subject assigned to the message.
sentTimestamp Time handling of the message ended.
envelope Information about about terminal type and originating operator.
MMSContent An array of the actual content of the reply message.
type The content type of the message.
filename The filename for the message content.
payload The content of the message.
# Frequently Asked Questions **Q: Can I send a broadcast message using the Telstra Messging API?** A. Yes. Recipient numbers can be in teh form of an array of strings if a broadcast message needs to be sent.

Notes

View messaging in Swagger UI # noqa: E501 + # Introduction Send and receive SMS and MMS messages globally using Telstra’s enterprise grade Messaging API. It also allows your application to track the delivery status of both sent and received messages. Get your dedicated Australian number, and start sending and receiving messages today. # Features The Telstra Messaging API provides the features below. | Feature | Description | | --- | --- | | `Dedicated Number` | Provision a mobile number for your account to be used as `from` address in the API | | `Send Messages` | Sending SMS or MMS messages | | `Receive Messages` | Telstra will deliver messages sent to a dedicated number or to the `notifyURL` defined by you | | `Broadcast Messages` | Invoke a single API call to send a message to a list of numbers provided in `to` | | `Delivery Status` | Query the delivery status of your messages | | `Callbacks` | Provide a notification URL and Telstra will notify your app when a message status changes | | `Alphanumeric Identifier` | Differentiate yourself by providing an alphanumeric string in `from`. This feature is only available on paid plans | | `Concatenation` | Send messages up to 1900 characters long and Telstra will automaticaly segment and reassemble them | | `Reply Request` | Create a chat session by associating `messageId` and `to` number to track responses received from a mobile number. We will store this association for 8 days | | `Character set` | Accepts all Unicode characters as part of UTF-8 | | `Bounce-back response` | See if your SMS hits an unreachable or unallocated number (Australia Only) | | `Queuing` | Messaging API will automatically queue and deliver each message at a compliant rate. | | `Emoji Encoding` | The API supports the encoding of the full range of emojis. Emojis in the reply messages will be in their UTF-8 format. | ## Delivery Notification or Callbacks The API provides several methods for notifying when a message has been delivered to the destination. 1. When you send a message there is an opportunity to specify a `notifyURL`. Once the message has been delivered the API will make a call to this URL to advise of the message status. 2. If you do not specify a URL you can always call the `GET /status` API to get the status of the message. # Getting Access to the API 1. Register at [https://dev.telstra.com](https://dev.telstra.com). 2. After registration, login to [https://dev.telstra.com](https://dev.telstra.com) and navigate to the **My apps** page. 3. Create your application by clicking the **Add new app** button 4. Select **API Free Trial** Product when configuring your application. This Product includes the Telstra Messaging API as well as other free trial APIs. Your application will be approved automatically. 5. There is a maximum of 1000 free messages per developer. Additional messages and features can be purchased from [https://dev.telstra.com](https://dev.telstra.com). 6. Note your `Client key` and `Client secret` as these will be needed to provision a number for your application and for authentication. Now head over to **Getting Started** where you can find a postman collection as well as some links to sample apps and SDKs to get you started. Happy Messaging! # Frequently Asked Questions **Q: Is creating a subscription via the Provisioning call a required step?** A. Yes. You will only be able to start sending messages if you have a provisioned dedicated number. Use Provisioning to create a dedicated number subscription, or renew your dedicated number if it has expired. **Q: When trying to send an SMS I receive a `400 Bad Request` response. How can I fix this?** A. You need to make sure you have a provisioned dedicated number before you can send an SMS. If you do not have a provisioned dedicated number and you try to send a message via the API, you will get the error below in the response:
{   \"status\":\"400\",   \"code\":\"DELIVERY-IMPOSSIBLE\",   \"message\":\"Invalid \\'from\\' address specified\" }
Use Provisioning to create a dedicated number subscription, or renew your dedicated number if it has expired. **Q: Can I send a broadcast message using the Telstra Messaging API?** A. Yes. Recipient numbers can be in the form of an array of strings if a broadcast message needs to be sent, allowing you to send to multiple mobile numbers in one API call. A sample request body for this will be: `{\"to\":[\"+61412345678\",\"+61487654321\"],\"body\":\"Test Message\"}` **Q: Can I use `Alphanumeric Identifier` from my paid plan via credit card?** A. `Alphanumeric Identifier` is only available on Telstra Account paid plans, not through credit card paid plans. **Q: How long does my dedicated number stay active for?** A. When you provision a dedicated number, by default it will be active for 30-days. You can use the `activeDays` parameter during the provisioning call to increment or decrement the number of days your dedicated number will remain active. **Q: What is the maximum sized MMS that I can send?** A. This will depend on the carrier that will receive the MMS. For Telstra it's up to 2MB, Optus up to 1.5MB and Vodafone only allows up to 500kB. You will need to check with international carriers for thier MMS size limits. **Q: Are SMILs supported by the Messaging API?** A. While there will be no error if you send an MMS with a SMIL presentation, the actual layout or sequence defined in the SMIL may not display as expected because most of the new smartphone devices ignore the SMIL presentation layer. SMIL was used in feature phones which had limited capability and SMIL allowed a *powerpoint type* presentation to be provided. Smartphones now have the capability to display video which is the better option for presentations. It is recommended that MMS messages should just drop the SMIL. **Q: How do I assign a delivery notification or callback URL?** A. You can assign a delivery notification or callback URL by adding the `notifyURL` parameter in the body of the request when you send a message. Once the message has been delivered, a notification will then be posted to this callback URL. **Q: What is the difference between the `notifyURL` parameter in the Provisoning call versus the `notifyURL` parameter in the Send Message call?** A. The `notifyURL` in the Provisoning call will be the URL where replies to the provisioned number will be posted. On the other hand, the `notifyURL` in the Send Message call will be the URL where the delivery notification will be posted, e.g. when an SMS has already been delivered to the recipient. # Getting Started Below are the steps to get started with the Telstra Messaging API. 1. Generate an OAuth2 token using your `Client key` and `Client secret`. 2. Use the Provisioning call to create a subscription and receive a dedicated number. 3. Send a message to a specific mobile number. ## Run in Postman \"Run ## Sample Apps - [Perl Sample App](https://github.com/telstra/MessagingAPI-perl-sample-app) - [Happy Chat App](https://github.com/telstra/messaging-sample-code-happy-chat) - [PHP Sample App](https://github.com/developersteve/telstra-messaging-php) ## SDK Repos - [Messaging API - PHP SDK](https://github.com/telstra/MessagingAPI-SDK-php) - [Messaging API - Python SDK](https://github.com/telstra/MessagingAPI-SDK-python) - [Messaging API - Ruby SDK](https://github.com/telstra/MessagingAPI-SDK-ruby) - [Messaging API - NodeJS SDK](https://github.com/telstra/MessagingAPI-SDK-node) - [Messaging API - .Net2 SDK](https://github.com/telstra/MessagingAPI-SDK-dotnet) - [Messaging API - Java SDK](https://github.com/telstra/MessagingAPI-SDK-Java) ## Blog Posts For more information on the Messaging API, you can read these blog posts: - [Callbacks Part 1](https://dev.telstra.com/content/understanding-messaging-api-callbacks-part-1) - [Callbacks Part 2](https://dev.telstra.com/content/understanding-messaging-api-callbacks-part-2) # noqa: E501 OpenAPI spec version: 2.2.6 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ from __future__ import absolute_import @@ -29,15 +28,15 @@ class ApiClient(object): - """Generic API client for Swagger client library builds. + """Generic API client for OpenAPI client library builds. - Swagger generic API client. This client handles the client- + OpenAPI generic API client. This client handles the client- server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the Swagger + the methods and models for each application are generated from the OpenAPI templates. - NOTE: This class is auto generated by the swagger code generator program. - Ref: https://github.com/swagger-api/swagger-codegen + NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. :param configuration: .Configuration object for this client @@ -73,7 +72,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None, self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'Swagger-Codegen/1.0.4/python' + self.user_agent = 'OpenAPI-Generator/1.0.4.1/python' def __del__(self): self.pool.close() @@ -177,7 +176,7 @@ def sanitize_for_serialization(self, obj): convert to string in iso8601 format. If obj is list, sanitize each element in the list. If obj is dict, return the dict. - If obj is swagger model, return the properties dict. + If obj is OpenAPI model, return the properties dict. :param obj: The data to serialize. :return: The serialized form of data. @@ -199,12 +198,12 @@ def sanitize_for_serialization(self, obj): obj_dict = obj else: # Convert model obj to dict except - # attributes `swagger_types`, `attribute_map` + # attributes `openapi_types`, `attribute_map` # and attributes which value is not None. # Convert attribute name to json key in # model definition for request. obj_dict = {obj.attribute_map[attr]: getattr(obj, attr) - for attr, _ in six.iteritems(obj.swagger_types) + for attr, _ in six.iteritems(obj.openapi_types) if getattr(obj, attr) is not None} return {key: self.sanitize_for_serialization(val) @@ -541,7 +540,7 @@ def __deserialize_primitive(self, data, klass): try: return klass(data) except UnicodeEncodeError: - return six.u(data) + return six.text_type(data) except TypeError: return data @@ -599,13 +598,13 @@ def __deserialize_model(self, data, klass): :return: model object. """ - if not klass.swagger_types and not hasattr(klass, + if not klass.openapi_types and not hasattr(klass, 'get_real_child_model'): return data kwargs = {} - if klass.swagger_types is not None: - for attr, attr_type in six.iteritems(klass.swagger_types): + if klass.openapi_types is not None: + for attr, attr_type in six.iteritems(klass.openapi_types): if (data is not None and klass.attribute_map[attr] in data and isinstance(data, (list, dict))): diff --git a/Telstra_Messaging/configuration.py b/Telstra_Messaging/configuration.py index 43e1cde..f55b721 100644 --- a/Telstra_Messaging/configuration.py +++ b/Telstra_Messaging/configuration.py @@ -3,11 +3,10 @@ """ Telstra Messaging API - # Introduction Send and receive SMS and MMS messages globally using Telstra’s enterprise grade Messaging API. It also allows your application to track the delivery status of both sent and received messages. Get your dedicated Australian number, and start sending and receiving messages today. # Features

The Telstra Messaging API provides the features below.
Feature Description
Dedicated Number Provision a mobile number for your account to be used as from address in the API
Send Messages Sending SMS or MMS messages
Receive Messages Telstra will deliver messages sent to a dedicated number or to the notifyURL defined by you
Broadcast Messages Invoke a single API to send a message to a list of number provided in to
Delivery Status Query the delivery status of your messages
Callbacks Provide a notification URL and Telstra will notify your app when messages status changes
Alphanumeric Identifier Differentiate yourself by providing an alphanumeric string in from. This feature is only available on paid plans
Concatenation Send messages up to 1900 characters long and Telstra will automaticaly segment and reassemble them
Reply Request Create a chat session by associating messageId and to number to track responses received from a mobile number. We will store this association for 8 days
Character set Accepts all Unicode characters as part of UTF-8
Bounce-back response See if your SMS hits an unreachable or unallocated number (Australia Only)
Queuing Messaging API will automatically queue and deliver each message at a compliant rate.
Emoji Encoding The API supports the encoding of the full range of emojis. Emojis in the reply messages will be in their UTF-8 format.
# Getting Access to the API

  1. Register at https://dev.telstra.com.
  2. After registration, login to https://dev.telstra.com and navigate to the "My apps" page.
  3. Create your application by clicking the "Add new app" button
  4. Select "API Free Trial" Product when configuring your application. This Product includes the Telstra Messaging API as well as other APIs. Your application will be approved automatically.
  5. There is a maximum of 1000 free messages per developer. Additional messages and features can be purchased from https://dev.telstra.com.
  6. Note your Client key and Client secret as these will be needed to provision a number for your application and for authentication.

Now head over to Getting Started where you can find a postman collection as well as some links to sample apps and SDKs to get you started.

Happy Messaging! # Getting Started

Below are the steps to get started with the Telstra Messaging API.

  1. Generate OAuth2 Token using your Client key and Client secret.
  2. Create Subscription in order to receive a provisioned number.
  3. Send Message to a specific mobile number.

Run in Postman

\"Run

Sample Apps

- Perl Sample App - Happy Chat App - PHP Sample App

SDK repos

- Messaging API - PHP SDK - Messaging API - Python SDK - Messaging API - Ruby SDK - Messaging API - NodeJS SDK - Messaging API - .Net2 SDK - Messaging API - Java SDK # Delivery Notification The API provides several methods for notifying when a message has been delivered to the destination.
  1. When you provision a number there is an opportunity to specify a notifyURL, when the message has been delivered the API will make a call to this URL to advise of the message status. If this is not provided then you can make use the Get Replies API to poll for messages.
  2. If you do not specify a URL you can always call the GET /sms API get the latest replies to the message.
Please note that the notification URLs and the polling call are exclusive. If a notification URL has been set then the polling call will not provide any useful information.

Notification URL Format

When a message has reached its final state, the API will send a POST to the URL that has been previously specified.

Notification URL Format for SMS

{     to: '+61418123456'     sentTimestamp: '2017-03-17T10:05:22+10:00'     receivedTimestamp: '2017-03-17T10:05:23+10:00'     messageId: /cccb284200035236000000000ee9d074019e0301/1261418123456     deliveryStatus: DELIVRD   } 
\\ The fields are:
Field Description
to The number the message was sent to.
receivedTimestamp Time the message was sent to the API.
sentTimestamp Time handling of the message ended.
deliveryStatus The final state of the message.
messageId The same reference that was returned when the original message was sent.
receivedTimestamp Time the message was sent to the API.
Upon receiving this call it is expected that your servers will give a 204 (No Content) response. Anything else will cause the API to reattempt the call 5 minutes later.

Notification URL Format for SMS Replies

{     \"status\": \"RECEIVED\"     \"destinationAddress\": \"+61418123456\"     \"senderAddress\": \"+61421987654\"     \"message\": \"Foo\"             \"sentTimestamp\": \"2018-03-23T12:10:06+10:00\"   }                              
\\ The fields are:
Field Description
status The final state of the message.
destinationAddress The number the message was sent to.
senderAddress The number the message was sent from.
message The sontent of the SMS reply.
sentTimestamp Time handling of the message ended.

Notification URL Format for MMS Replies

{     \"status\": \"RECEIVED\",     \"destinationAddress\": \"+61418123456\",     \"senderAddress\": \"+61421987654\",     \"subject\": \"Foo\",     \"sentTimestamp\": \"2018-03-23T12:15:45+10:00\",     \"envelope\": \"string\",     \"MMSContent\":      [       {         \"type\": \"application/smil\",         \"filename\": \"smil.xml\",         \"payload\": \"string\"       },        {         \"type\": \"image/jpeg\",         \"filename\": \"sample.jpeg\",         \"payload\": \"string\"        }      ]    } 
\\ The fields are:
Field Description
status The final state of the message.
destinationAddress The number the message was sent to.
senderAddress The number the message was sent from.
subject The subject assigned to the message.
sentTimestamp Time handling of the message ended.
envelope Information about about terminal type and originating operator.
MMSContent An array of the actual content of the reply message.
type The content type of the message.
filename The filename for the message content.
payload The content of the message.
# Frequently Asked Questions **Q: Can I send a broadcast message using the Telstra Messging API?** A. Yes. Recipient numbers can be in teh form of an array of strings if a broadcast message needs to be sent.

Notes

View messaging in Swagger UI # noqa: E501 + # Introduction Send and receive SMS and MMS messages globally using Telstra’s enterprise grade Messaging API. It also allows your application to track the delivery status of both sent and received messages. Get your dedicated Australian number, and start sending and receiving messages today. # Features The Telstra Messaging API provides the features below. | Feature | Description | | --- | --- | | `Dedicated Number` | Provision a mobile number for your account to be used as `from` address in the API | | `Send Messages` | Sending SMS or MMS messages | | `Receive Messages` | Telstra will deliver messages sent to a dedicated number or to the `notifyURL` defined by you | | `Broadcast Messages` | Invoke a single API call to send a message to a list of numbers provided in `to` | | `Delivery Status` | Query the delivery status of your messages | | `Callbacks` | Provide a notification URL and Telstra will notify your app when a message status changes | | `Alphanumeric Identifier` | Differentiate yourself by providing an alphanumeric string in `from`. This feature is only available on paid plans | | `Concatenation` | Send messages up to 1900 characters long and Telstra will automaticaly segment and reassemble them | | `Reply Request` | Create a chat session by associating `messageId` and `to` number to track responses received from a mobile number. We will store this association for 8 days | | `Character set` | Accepts all Unicode characters as part of UTF-8 | | `Bounce-back response` | See if your SMS hits an unreachable or unallocated number (Australia Only) | | `Queuing` | Messaging API will automatically queue and deliver each message at a compliant rate. | | `Emoji Encoding` | The API supports the encoding of the full range of emojis. Emojis in the reply messages will be in their UTF-8 format. | ## Delivery Notification or Callbacks The API provides several methods for notifying when a message has been delivered to the destination. 1. When you send a message there is an opportunity to specify a `notifyURL`. Once the message has been delivered the API will make a call to this URL to advise of the message status. 2. If you do not specify a URL you can always call the `GET /status` API to get the status of the message. # Getting Access to the API 1. Register at [https://dev.telstra.com](https://dev.telstra.com). 2. After registration, login to [https://dev.telstra.com](https://dev.telstra.com) and navigate to the **My apps** page. 3. Create your application by clicking the **Add new app** button 4. Select **API Free Trial** Product when configuring your application. This Product includes the Telstra Messaging API as well as other free trial APIs. Your application will be approved automatically. 5. There is a maximum of 1000 free messages per developer. Additional messages and features can be purchased from [https://dev.telstra.com](https://dev.telstra.com). 6. Note your `Client key` and `Client secret` as these will be needed to provision a number for your application and for authentication. Now head over to **Getting Started** where you can find a postman collection as well as some links to sample apps and SDKs to get you started. Happy Messaging! # Frequently Asked Questions **Q: Is creating a subscription via the Provisioning call a required step?** A. Yes. You will only be able to start sending messages if you have a provisioned dedicated number. Use Provisioning to create a dedicated number subscription, or renew your dedicated number if it has expired. **Q: When trying to send an SMS I receive a `400 Bad Request` response. How can I fix this?** A. You need to make sure you have a provisioned dedicated number before you can send an SMS. If you do not have a provisioned dedicated number and you try to send a message via the API, you will get the error below in the response:
{   \"status\":\"400\",   \"code\":\"DELIVERY-IMPOSSIBLE\",   \"message\":\"Invalid \\'from\\' address specified\" }
Use Provisioning to create a dedicated number subscription, or renew your dedicated number if it has expired. **Q: Can I send a broadcast message using the Telstra Messaging API?** A. Yes. Recipient numbers can be in the form of an array of strings if a broadcast message needs to be sent, allowing you to send to multiple mobile numbers in one API call. A sample request body for this will be: `{\"to\":[\"+61412345678\",\"+61487654321\"],\"body\":\"Test Message\"}` **Q: Can I use `Alphanumeric Identifier` from my paid plan via credit card?** A. `Alphanumeric Identifier` is only available on Telstra Account paid plans, not through credit card paid plans. **Q: How long does my dedicated number stay active for?** A. When you provision a dedicated number, by default it will be active for 30-days. You can use the `activeDays` parameter during the provisioning call to increment or decrement the number of days your dedicated number will remain active. **Q: What is the maximum sized MMS that I can send?** A. This will depend on the carrier that will receive the MMS. For Telstra it's up to 2MB, Optus up to 1.5MB and Vodafone only allows up to 500kB. You will need to check with international carriers for thier MMS size limits. **Q: Are SMILs supported by the Messaging API?** A. While there will be no error if you send an MMS with a SMIL presentation, the actual layout or sequence defined in the SMIL may not display as expected because most of the new smartphone devices ignore the SMIL presentation layer. SMIL was used in feature phones which had limited capability and SMIL allowed a *powerpoint type* presentation to be provided. Smartphones now have the capability to display video which is the better option for presentations. It is recommended that MMS messages should just drop the SMIL. **Q: How do I assign a delivery notification or callback URL?** A. You can assign a delivery notification or callback URL by adding the `notifyURL` parameter in the body of the request when you send a message. Once the message has been delivered, a notification will then be posted to this callback URL. **Q: What is the difference between the `notifyURL` parameter in the Provisoning call versus the `notifyURL` parameter in the Send Message call?** A. The `notifyURL` in the Provisoning call will be the URL where replies to the provisioned number will be posted. On the other hand, the `notifyURL` in the Send Message call will be the URL where the delivery notification will be posted, e.g. when an SMS has already been delivered to the recipient. # Getting Started Below are the steps to get started with the Telstra Messaging API. 1. Generate an OAuth2 token using your `Client key` and `Client secret`. 2. Use the Provisioning call to create a subscription and receive a dedicated number. 3. Send a message to a specific mobile number. ## Run in Postman \"Run ## Sample Apps - [Perl Sample App](https://github.com/telstra/MessagingAPI-perl-sample-app) - [Happy Chat App](https://github.com/telstra/messaging-sample-code-happy-chat) - [PHP Sample App](https://github.com/developersteve/telstra-messaging-php) ## SDK Repos - [Messaging API - PHP SDK](https://github.com/telstra/MessagingAPI-SDK-php) - [Messaging API - Python SDK](https://github.com/telstra/MessagingAPI-SDK-python) - [Messaging API - Ruby SDK](https://github.com/telstra/MessagingAPI-SDK-ruby) - [Messaging API - NodeJS SDK](https://github.com/telstra/MessagingAPI-SDK-node) - [Messaging API - .Net2 SDK](https://github.com/telstra/MessagingAPI-SDK-dotnet) - [Messaging API - Java SDK](https://github.com/telstra/MessagingAPI-SDK-Java) ## Blog Posts For more information on the Messaging API, you can read these blog posts: - [Callbacks Part 1](https://dev.telstra.com/content/understanding-messaging-api-callbacks-part-1) - [Callbacks Part 2](https://dev.telstra.com/content/understanding-messaging-api-callbacks-part-2) # noqa: E501 OpenAPI spec version: 2.2.6 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -38,9 +37,9 @@ def set_default(cls, default): class Configuration(six.with_metaclass(TypeWithDefault, object)): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://github.com/swagger-api/swagger-codegen + Ref: https://openapi-generator.tech Do not edit the class manually. """ @@ -247,5 +246,5 @@ def to_debug_report(self): "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: 2.2.6\n"\ - "SDK Package Version: 1.0.4".\ + "SDK Package Version: 1.0.4.1".\ format(env=sys.platform, pyversion=sys.version) diff --git a/Telstra_Messaging/models/__init__.py b/Telstra_Messaging/models/__init__.py index 5166911..9e4b80d 100644 --- a/Telstra_Messaging/models/__init__.py +++ b/Telstra_Messaging/models/__init__.py @@ -4,11 +4,10 @@ """ Telstra Messaging API - # Introduction Send and receive SMS and MMS messages globally using Telstra’s enterprise grade Messaging API. It also allows your application to track the delivery status of both sent and received messages. Get your dedicated Australian number, and start sending and receiving messages today. # Features

The Telstra Messaging API provides the features below.
Feature Description
Dedicated Number Provision a mobile number for your account to be used as from address in the API
Send Messages Sending SMS or MMS messages
Receive Messages Telstra will deliver messages sent to a dedicated number or to the notifyURL defined by you
Broadcast Messages Invoke a single API to send a message to a list of number provided in to
Delivery Status Query the delivery status of your messages
Callbacks Provide a notification URL and Telstra will notify your app when messages status changes
Alphanumeric Identifier Differentiate yourself by providing an alphanumeric string in from. This feature is only available on paid plans
Concatenation Send messages up to 1900 characters long and Telstra will automaticaly segment and reassemble them
Reply Request Create a chat session by associating messageId and to number to track responses received from a mobile number. We will store this association for 8 days
Character set Accepts all Unicode characters as part of UTF-8
Bounce-back response See if your SMS hits an unreachable or unallocated number (Australia Only)
Queuing Messaging API will automatically queue and deliver each message at a compliant rate.
Emoji Encoding The API supports the encoding of the full range of emojis. Emojis in the reply messages will be in their UTF-8 format.
# Getting Access to the API

  1. Register at https://dev.telstra.com.
  2. After registration, login to https://dev.telstra.com and navigate to the "My apps" page.
  3. Create your application by clicking the "Add new app" button
  4. Select "API Free Trial" Product when configuring your application. This Product includes the Telstra Messaging API as well as other APIs. Your application will be approved automatically.
  5. There is a maximum of 1000 free messages per developer. Additional messages and features can be purchased from https://dev.telstra.com.
  6. Note your Client key and Client secret as these will be needed to provision a number for your application and for authentication.

Now head over to Getting Started where you can find a postman collection as well as some links to sample apps and SDKs to get you started.

Happy Messaging! # Getting Started

Below are the steps to get started with the Telstra Messaging API.

  1. Generate OAuth2 Token using your Client key and Client secret.
  2. Create Subscription in order to receive a provisioned number.
  3. Send Message to a specific mobile number.

Run in Postman

\"Run

Sample Apps

- Perl Sample App - Happy Chat App - PHP Sample App

SDK repos

- Messaging API - PHP SDK - Messaging API - Python SDK - Messaging API - Ruby SDK - Messaging API - NodeJS SDK - Messaging API - .Net2 SDK - Messaging API - Java SDK # Delivery Notification The API provides several methods for notifying when a message has been delivered to the destination.
  1. When you provision a number there is an opportunity to specify a notifyURL, when the message has been delivered the API will make a call to this URL to advise of the message status. If this is not provided then you can make use the Get Replies API to poll for messages.
  2. If you do not specify a URL you can always call the GET /sms API get the latest replies to the message.
Please note that the notification URLs and the polling call are exclusive. If a notification URL has been set then the polling call will not provide any useful information.

Notification URL Format

When a message has reached its final state, the API will send a POST to the URL that has been previously specified.

Notification URL Format for SMS

{     to: '+61418123456'     sentTimestamp: '2017-03-17T10:05:22+10:00'     receivedTimestamp: '2017-03-17T10:05:23+10:00'     messageId: /cccb284200035236000000000ee9d074019e0301/1261418123456     deliveryStatus: DELIVRD   } 
\\ The fields are:
Field Description
to The number the message was sent to.
receivedTimestamp Time the message was sent to the API.
sentTimestamp Time handling of the message ended.
deliveryStatus The final state of the message.
messageId The same reference that was returned when the original message was sent.
receivedTimestamp Time the message was sent to the API.
Upon receiving this call it is expected that your servers will give a 204 (No Content) response. Anything else will cause the API to reattempt the call 5 minutes later.

Notification URL Format for SMS Replies

{     \"status\": \"RECEIVED\"     \"destinationAddress\": \"+61418123456\"     \"senderAddress\": \"+61421987654\"     \"message\": \"Foo\"             \"sentTimestamp\": \"2018-03-23T12:10:06+10:00\"   }                              
\\ The fields are:
Field Description
status The final state of the message.
destinationAddress The number the message was sent to.
senderAddress The number the message was sent from.
message The sontent of the SMS reply.
sentTimestamp Time handling of the message ended.

Notification URL Format for MMS Replies

{     \"status\": \"RECEIVED\",     \"destinationAddress\": \"+61418123456\",     \"senderAddress\": \"+61421987654\",     \"subject\": \"Foo\",     \"sentTimestamp\": \"2018-03-23T12:15:45+10:00\",     \"envelope\": \"string\",     \"MMSContent\":      [       {         \"type\": \"application/smil\",         \"filename\": \"smil.xml\",         \"payload\": \"string\"       },        {         \"type\": \"image/jpeg\",         \"filename\": \"sample.jpeg\",         \"payload\": \"string\"        }      ]    } 
\\ The fields are:
Field Description
status The final state of the message.
destinationAddress The number the message was sent to.
senderAddress The number the message was sent from.
subject The subject assigned to the message.
sentTimestamp Time handling of the message ended.
envelope Information about about terminal type and originating operator.
MMSContent An array of the actual content of the reply message.
type The content type of the message.
filename The filename for the message content.
payload The content of the message.
# Frequently Asked Questions **Q: Can I send a broadcast message using the Telstra Messging API?** A. Yes. Recipient numbers can be in teh form of an array of strings if a broadcast message needs to be sent.

Notes

View messaging in Swagger UI # noqa: E501 + # Introduction Send and receive SMS and MMS messages globally using Telstra’s enterprise grade Messaging API. It also allows your application to track the delivery status of both sent and received messages. Get your dedicated Australian number, and start sending and receiving messages today. # Features The Telstra Messaging API provides the features below. | Feature | Description | | --- | --- | | `Dedicated Number` | Provision a mobile number for your account to be used as `from` address in the API | | `Send Messages` | Sending SMS or MMS messages | | `Receive Messages` | Telstra will deliver messages sent to a dedicated number or to the `notifyURL` defined by you | | `Broadcast Messages` | Invoke a single API call to send a message to a list of numbers provided in `to` | | `Delivery Status` | Query the delivery status of your messages | | `Callbacks` | Provide a notification URL and Telstra will notify your app when a message status changes | | `Alphanumeric Identifier` | Differentiate yourself by providing an alphanumeric string in `from`. This feature is only available on paid plans | | `Concatenation` | Send messages up to 1900 characters long and Telstra will automaticaly segment and reassemble them | | `Reply Request` | Create a chat session by associating `messageId` and `to` number to track responses received from a mobile number. We will store this association for 8 days | | `Character set` | Accepts all Unicode characters as part of UTF-8 | | `Bounce-back response` | See if your SMS hits an unreachable or unallocated number (Australia Only) | | `Queuing` | Messaging API will automatically queue and deliver each message at a compliant rate. | | `Emoji Encoding` | The API supports the encoding of the full range of emojis. Emojis in the reply messages will be in their UTF-8 format. | ## Delivery Notification or Callbacks The API provides several methods for notifying when a message has been delivered to the destination. 1. When you send a message there is an opportunity to specify a `notifyURL`. Once the message has been delivered the API will make a call to this URL to advise of the message status. 2. If you do not specify a URL you can always call the `GET /status` API to get the status of the message. # Getting Access to the API 1. Register at [https://dev.telstra.com](https://dev.telstra.com). 2. After registration, login to [https://dev.telstra.com](https://dev.telstra.com) and navigate to the **My apps** page. 3. Create your application by clicking the **Add new app** button 4. Select **API Free Trial** Product when configuring your application. This Product includes the Telstra Messaging API as well as other free trial APIs. Your application will be approved automatically. 5. There is a maximum of 1000 free messages per developer. Additional messages and features can be purchased from [https://dev.telstra.com](https://dev.telstra.com). 6. Note your `Client key` and `Client secret` as these will be needed to provision a number for your application and for authentication. Now head over to **Getting Started** where you can find a postman collection as well as some links to sample apps and SDKs to get you started. Happy Messaging! # Frequently Asked Questions **Q: Is creating a subscription via the Provisioning call a required step?** A. Yes. You will only be able to start sending messages if you have a provisioned dedicated number. Use Provisioning to create a dedicated number subscription, or renew your dedicated number if it has expired. **Q: When trying to send an SMS I receive a `400 Bad Request` response. How can I fix this?** A. You need to make sure you have a provisioned dedicated number before you can send an SMS. If you do not have a provisioned dedicated number and you try to send a message via the API, you will get the error below in the response:
{   \"status\":\"400\",   \"code\":\"DELIVERY-IMPOSSIBLE\",   \"message\":\"Invalid \\'from\\' address specified\" }
Use Provisioning to create a dedicated number subscription, or renew your dedicated number if it has expired. **Q: Can I send a broadcast message using the Telstra Messaging API?** A. Yes. Recipient numbers can be in the form of an array of strings if a broadcast message needs to be sent, allowing you to send to multiple mobile numbers in one API call. A sample request body for this will be: `{\"to\":[\"+61412345678\",\"+61487654321\"],\"body\":\"Test Message\"}` **Q: Can I use `Alphanumeric Identifier` from my paid plan via credit card?** A. `Alphanumeric Identifier` is only available on Telstra Account paid plans, not through credit card paid plans. **Q: How long does my dedicated number stay active for?** A. When you provision a dedicated number, by default it will be active for 30-days. You can use the `activeDays` parameter during the provisioning call to increment or decrement the number of days your dedicated number will remain active. **Q: What is the maximum sized MMS that I can send?** A. This will depend on the carrier that will receive the MMS. For Telstra it's up to 2MB, Optus up to 1.5MB and Vodafone only allows up to 500kB. You will need to check with international carriers for thier MMS size limits. **Q: Are SMILs supported by the Messaging API?** A. While there will be no error if you send an MMS with a SMIL presentation, the actual layout or sequence defined in the SMIL may not display as expected because most of the new smartphone devices ignore the SMIL presentation layer. SMIL was used in feature phones which had limited capability and SMIL allowed a *powerpoint type* presentation to be provided. Smartphones now have the capability to display video which is the better option for presentations. It is recommended that MMS messages should just drop the SMIL. **Q: How do I assign a delivery notification or callback URL?** A. You can assign a delivery notification or callback URL by adding the `notifyURL` parameter in the body of the request when you send a message. Once the message has been delivered, a notification will then be posted to this callback URL. **Q: What is the difference between the `notifyURL` parameter in the Provisoning call versus the `notifyURL` parameter in the Send Message call?** A. The `notifyURL` in the Provisoning call will be the URL where replies to the provisioned number will be posted. On the other hand, the `notifyURL` in the Send Message call will be the URL where the delivery notification will be posted, e.g. when an SMS has already been delivered to the recipient. # Getting Started Below are the steps to get started with the Telstra Messaging API. 1. Generate an OAuth2 token using your `Client key` and `Client secret`. 2. Use the Provisioning call to create a subscription and receive a dedicated number. 3. Send a message to a specific mobile number. ## Run in Postman \"Run ## Sample Apps - [Perl Sample App](https://github.com/telstra/MessagingAPI-perl-sample-app) - [Happy Chat App](https://github.com/telstra/messaging-sample-code-happy-chat) - [PHP Sample App](https://github.com/developersteve/telstra-messaging-php) ## SDK Repos - [Messaging API - PHP SDK](https://github.com/telstra/MessagingAPI-SDK-php) - [Messaging API - Python SDK](https://github.com/telstra/MessagingAPI-SDK-python) - [Messaging API - Ruby SDK](https://github.com/telstra/MessagingAPI-SDK-ruby) - [Messaging API - NodeJS SDK](https://github.com/telstra/MessagingAPI-SDK-node) - [Messaging API - .Net2 SDK](https://github.com/telstra/MessagingAPI-SDK-dotnet) - [Messaging API - Java SDK](https://github.com/telstra/MessagingAPI-SDK-Java) ## Blog Posts For more information on the Messaging API, you can read these blog posts: - [Callbacks Part 1](https://dev.telstra.com/content/understanding-messaging-api-callbacks-part-1) - [Callbacks Part 2](https://dev.telstra.com/content/understanding-messaging-api-callbacks-part-2) # noqa: E501 OpenAPI spec version: 2.2.6 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ diff --git a/Telstra_Messaging/models/delete_number_request.py b/Telstra_Messaging/models/delete_number_request.py index 550b0a1..399fc9a 100644 --- a/Telstra_Messaging/models/delete_number_request.py +++ b/Telstra_Messaging/models/delete_number_request.py @@ -3,11 +3,10 @@ """ Telstra Messaging API - # Introduction Send and receive SMS and MMS messages globally using Telstra’s enterprise grade Messaging API. It also allows your application to track the delivery status of both sent and received messages. Get your dedicated Australian number, and start sending and receiving messages today. # Features

The Telstra Messaging API provides the features below.
Feature Description
Dedicated Number Provision a mobile number for your account to be used as from address in the API
Send Messages Sending SMS or MMS messages
Receive Messages Telstra will deliver messages sent to a dedicated number or to the notifyURL defined by you
Broadcast Messages Invoke a single API to send a message to a list of number provided in to
Delivery Status Query the delivery status of your messages
Callbacks Provide a notification URL and Telstra will notify your app when messages status changes
Alphanumeric Identifier Differentiate yourself by providing an alphanumeric string in from. This feature is only available on paid plans
Concatenation Send messages up to 1900 characters long and Telstra will automaticaly segment and reassemble them
Reply Request Create a chat session by associating messageId and to number to track responses received from a mobile number. We will store this association for 8 days
Character set Accepts all Unicode characters as part of UTF-8
Bounce-back response See if your SMS hits an unreachable or unallocated number (Australia Only)
Queuing Messaging API will automatically queue and deliver each message at a compliant rate.
Emoji Encoding The API supports the encoding of the full range of emojis. Emojis in the reply messages will be in their UTF-8 format.
# Getting Access to the API

  1. Register at https://dev.telstra.com.
  2. After registration, login to https://dev.telstra.com and navigate to the "My apps" page.
  3. Create your application by clicking the "Add new app" button
  4. Select "API Free Trial" Product when configuring your application. This Product includes the Telstra Messaging API as well as other APIs. Your application will be approved automatically.
  5. There is a maximum of 1000 free messages per developer. Additional messages and features can be purchased from https://dev.telstra.com.
  6. Note your Client key and Client secret as these will be needed to provision a number for your application and for authentication.

Now head over to Getting Started where you can find a postman collection as well as some links to sample apps and SDKs to get you started.

Happy Messaging! # Getting Started

Below are the steps to get started with the Telstra Messaging API.

  1. Generate OAuth2 Token using your Client key and Client secret.
  2. Create Subscription in order to receive a provisioned number.
  3. Send Message to a specific mobile number.

Run in Postman

\"Run

Sample Apps

- Perl Sample App - Happy Chat App - PHP Sample App

SDK repos

- Messaging API - PHP SDK - Messaging API - Python SDK - Messaging API - Ruby SDK - Messaging API - NodeJS SDK - Messaging API - .Net2 SDK - Messaging API - Java SDK # Delivery Notification The API provides several methods for notifying when a message has been delivered to the destination.
  1. When you provision a number there is an opportunity to specify a notifyURL, when the message has been delivered the API will make a call to this URL to advise of the message status. If this is not provided then you can make use the Get Replies API to poll for messages.
  2. If you do not specify a URL you can always call the GET /sms API get the latest replies to the message.
Please note that the notification URLs and the polling call are exclusive. If a notification URL has been set then the polling call will not provide any useful information.

Notification URL Format

When a message has reached its final state, the API will send a POST to the URL that has been previously specified.

Notification URL Format for SMS

{     to: '+61418123456'     sentTimestamp: '2017-03-17T10:05:22+10:00'     receivedTimestamp: '2017-03-17T10:05:23+10:00'     messageId: /cccb284200035236000000000ee9d074019e0301/1261418123456     deliveryStatus: DELIVRD   } 
\\ The fields are:
Field Description
to The number the message was sent to.
receivedTimestamp Time the message was sent to the API.
sentTimestamp Time handling of the message ended.
deliveryStatus The final state of the message.
messageId The same reference that was returned when the original message was sent.
receivedTimestamp Time the message was sent to the API.
Upon receiving this call it is expected that your servers will give a 204 (No Content) response. Anything else will cause the API to reattempt the call 5 minutes later.

Notification URL Format for SMS Replies

{     \"status\": \"RECEIVED\"     \"destinationAddress\": \"+61418123456\"     \"senderAddress\": \"+61421987654\"     \"message\": \"Foo\"             \"sentTimestamp\": \"2018-03-23T12:10:06+10:00\"   }                              
\\ The fields are:
Field Description
status The final state of the message.
destinationAddress The number the message was sent to.
senderAddress The number the message was sent from.
message The sontent of the SMS reply.
sentTimestamp Time handling of the message ended.

Notification URL Format for MMS Replies

{     \"status\": \"RECEIVED\",     \"destinationAddress\": \"+61418123456\",     \"senderAddress\": \"+61421987654\",     \"subject\": \"Foo\",     \"sentTimestamp\": \"2018-03-23T12:15:45+10:00\",     \"envelope\": \"string\",     \"MMSContent\":      [       {         \"type\": \"application/smil\",         \"filename\": \"smil.xml\",         \"payload\": \"string\"       },        {         \"type\": \"image/jpeg\",         \"filename\": \"sample.jpeg\",         \"payload\": \"string\"        }      ]    } 
\\ The fields are:
Field Description
status The final state of the message.
destinationAddress The number the message was sent to.
senderAddress The number the message was sent from.
subject The subject assigned to the message.
sentTimestamp Time handling of the message ended.
envelope Information about about terminal type and originating operator.
MMSContent An array of the actual content of the reply message.
type The content type of the message.
filename The filename for the message content.
payload The content of the message.
# Frequently Asked Questions **Q: Can I send a broadcast message using the Telstra Messging API?** A. Yes. Recipient numbers can be in teh form of an array of strings if a broadcast message needs to be sent.

Notes

View messaging in Swagger UI # noqa: E501 + # Introduction Send and receive SMS and MMS messages globally using Telstra’s enterprise grade Messaging API. It also allows your application to track the delivery status of both sent and received messages. Get your dedicated Australian number, and start sending and receiving messages today. # Features The Telstra Messaging API provides the features below. | Feature | Description | | --- | --- | | `Dedicated Number` | Provision a mobile number for your account to be used as `from` address in the API | | `Send Messages` | Sending SMS or MMS messages | | `Receive Messages` | Telstra will deliver messages sent to a dedicated number or to the `notifyURL` defined by you | | `Broadcast Messages` | Invoke a single API call to send a message to a list of numbers provided in `to` | | `Delivery Status` | Query the delivery status of your messages | | `Callbacks` | Provide a notification URL and Telstra will notify your app when a message status changes | | `Alphanumeric Identifier` | Differentiate yourself by providing an alphanumeric string in `from`. This feature is only available on paid plans | | `Concatenation` | Send messages up to 1900 characters long and Telstra will automaticaly segment and reassemble them | | `Reply Request` | Create a chat session by associating `messageId` and `to` number to track responses received from a mobile number. We will store this association for 8 days | | `Character set` | Accepts all Unicode characters as part of UTF-8 | | `Bounce-back response` | See if your SMS hits an unreachable or unallocated number (Australia Only) | | `Queuing` | Messaging API will automatically queue and deliver each message at a compliant rate. | | `Emoji Encoding` | The API supports the encoding of the full range of emojis. Emojis in the reply messages will be in their UTF-8 format. | ## Delivery Notification or Callbacks The API provides several methods for notifying when a message has been delivered to the destination. 1. When you send a message there is an opportunity to specify a `notifyURL`. Once the message has been delivered the API will make a call to this URL to advise of the message status. 2. If you do not specify a URL you can always call the `GET /status` API to get the status of the message. # Getting Access to the API 1. Register at [https://dev.telstra.com](https://dev.telstra.com). 2. After registration, login to [https://dev.telstra.com](https://dev.telstra.com) and navigate to the **My apps** page. 3. Create your application by clicking the **Add new app** button 4. Select **API Free Trial** Product when configuring your application. This Product includes the Telstra Messaging API as well as other free trial APIs. Your application will be approved automatically. 5. There is a maximum of 1000 free messages per developer. Additional messages and features can be purchased from [https://dev.telstra.com](https://dev.telstra.com). 6. Note your `Client key` and `Client secret` as these will be needed to provision a number for your application and for authentication. Now head over to **Getting Started** where you can find a postman collection as well as some links to sample apps and SDKs to get you started. Happy Messaging! # Frequently Asked Questions **Q: Is creating a subscription via the Provisioning call a required step?** A. Yes. You will only be able to start sending messages if you have a provisioned dedicated number. Use Provisioning to create a dedicated number subscription, or renew your dedicated number if it has expired. **Q: When trying to send an SMS I receive a `400 Bad Request` response. How can I fix this?** A. You need to make sure you have a provisioned dedicated number before you can send an SMS. If you do not have a provisioned dedicated number and you try to send a message via the API, you will get the error below in the response:
{   \"status\":\"400\",   \"code\":\"DELIVERY-IMPOSSIBLE\",   \"message\":\"Invalid \\'from\\' address specified\" }
Use Provisioning to create a dedicated number subscription, or renew your dedicated number if it has expired. **Q: Can I send a broadcast message using the Telstra Messaging API?** A. Yes. Recipient numbers can be in the form of an array of strings if a broadcast message needs to be sent, allowing you to send to multiple mobile numbers in one API call. A sample request body for this will be: `{\"to\":[\"+61412345678\",\"+61487654321\"],\"body\":\"Test Message\"}` **Q: Can I use `Alphanumeric Identifier` from my paid plan via credit card?** A. `Alphanumeric Identifier` is only available on Telstra Account paid plans, not through credit card paid plans. **Q: How long does my dedicated number stay active for?** A. When you provision a dedicated number, by default it will be active for 30-days. You can use the `activeDays` parameter during the provisioning call to increment or decrement the number of days your dedicated number will remain active. **Q: What is the maximum sized MMS that I can send?** A. This will depend on the carrier that will receive the MMS. For Telstra it's up to 2MB, Optus up to 1.5MB and Vodafone only allows up to 500kB. You will need to check with international carriers for thier MMS size limits. **Q: Are SMILs supported by the Messaging API?** A. While there will be no error if you send an MMS with a SMIL presentation, the actual layout or sequence defined in the SMIL may not display as expected because most of the new smartphone devices ignore the SMIL presentation layer. SMIL was used in feature phones which had limited capability and SMIL allowed a *powerpoint type* presentation to be provided. Smartphones now have the capability to display video which is the better option for presentations. It is recommended that MMS messages should just drop the SMIL. **Q: How do I assign a delivery notification or callback URL?** A. You can assign a delivery notification or callback URL by adding the `notifyURL` parameter in the body of the request when you send a message. Once the message has been delivered, a notification will then be posted to this callback URL. **Q: What is the difference between the `notifyURL` parameter in the Provisoning call versus the `notifyURL` parameter in the Send Message call?** A. The `notifyURL` in the Provisoning call will be the URL where replies to the provisioned number will be posted. On the other hand, the `notifyURL` in the Send Message call will be the URL where the delivery notification will be posted, e.g. when an SMS has already been delivered to the recipient. # Getting Started Below are the steps to get started with the Telstra Messaging API. 1. Generate an OAuth2 token using your `Client key` and `Client secret`. 2. Use the Provisioning call to create a subscription and receive a dedicated number. 3. Send a message to a specific mobile number. ## Run in Postman \"Run ## Sample Apps - [Perl Sample App](https://github.com/telstra/MessagingAPI-perl-sample-app) - [Happy Chat App](https://github.com/telstra/messaging-sample-code-happy-chat) - [PHP Sample App](https://github.com/developersteve/telstra-messaging-php) ## SDK Repos - [Messaging API - PHP SDK](https://github.com/telstra/MessagingAPI-SDK-php) - [Messaging API - Python SDK](https://github.com/telstra/MessagingAPI-SDK-python) - [Messaging API - Ruby SDK](https://github.com/telstra/MessagingAPI-SDK-ruby) - [Messaging API - NodeJS SDK](https://github.com/telstra/MessagingAPI-SDK-node) - [Messaging API - .Net2 SDK](https://github.com/telstra/MessagingAPI-SDK-dotnet) - [Messaging API - Java SDK](https://github.com/telstra/MessagingAPI-SDK-Java) ## Blog Posts For more information on the Messaging API, you can read these blog posts: - [Callbacks Part 1](https://dev.telstra.com/content/understanding-messaging-api-callbacks-part-1) - [Callbacks Part 2](https://dev.telstra.com/content/understanding-messaging-api-callbacks-part-2) # noqa: E501 OpenAPI spec version: 2.2.6 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,19 +17,20 @@ class DeleteNumberRequest(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { 'empty_arr': 'int' } @@ -39,7 +39,7 @@ class DeleteNumberRequest(object): } def __init__(self, empty_arr=0): # noqa: E501 - """DeleteNumberRequest - a model defined in Swagger""" # noqa: E501 + """DeleteNumberRequest - a model defined in OpenAPI""" # noqa: E501 self._empty_arr = None self.discriminator = None @@ -74,7 +74,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/Telstra_Messaging/models/get_subscription_response.py b/Telstra_Messaging/models/get_subscription_response.py index 4e613ca..5f1a922 100644 --- a/Telstra_Messaging/models/get_subscription_response.py +++ b/Telstra_Messaging/models/get_subscription_response.py @@ -3,11 +3,10 @@ """ Telstra Messaging API - # Introduction Send and receive SMS and MMS messages globally using Telstra’s enterprise grade Messaging API. It also allows your application to track the delivery status of both sent and received messages. Get your dedicated Australian number, and start sending and receiving messages today. # Features

The Telstra Messaging API provides the features below.
Feature Description
Dedicated Number Provision a mobile number for your account to be used as from address in the API
Send Messages Sending SMS or MMS messages
Receive Messages Telstra will deliver messages sent to a dedicated number or to the notifyURL defined by you
Broadcast Messages Invoke a single API to send a message to a list of number provided in to
Delivery Status Query the delivery status of your messages
Callbacks Provide a notification URL and Telstra will notify your app when messages status changes
Alphanumeric Identifier Differentiate yourself by providing an alphanumeric string in from. This feature is only available on paid plans
Concatenation Send messages up to 1900 characters long and Telstra will automaticaly segment and reassemble them
Reply Request Create a chat session by associating messageId and to number to track responses received from a mobile number. We will store this association for 8 days
Character set Accepts all Unicode characters as part of UTF-8
Bounce-back response See if your SMS hits an unreachable or unallocated number (Australia Only)
Queuing Messaging API will automatically queue and deliver each message at a compliant rate.
Emoji Encoding The API supports the encoding of the full range of emojis. Emojis in the reply messages will be in their UTF-8 format.
# Getting Access to the API

  1. Register at https://dev.telstra.com.
  2. After registration, login to https://dev.telstra.com and navigate to the "My apps" page.
  3. Create your application by clicking the "Add new app" button
  4. Select "API Free Trial" Product when configuring your application. This Product includes the Telstra Messaging API as well as other APIs. Your application will be approved automatically.
  5. There is a maximum of 1000 free messages per developer. Additional messages and features can be purchased from https://dev.telstra.com.
  6. Note your Client key and Client secret as these will be needed to provision a number for your application and for authentication.

Now head over to Getting Started where you can find a postman collection as well as some links to sample apps and SDKs to get you started.

Happy Messaging! # Getting Started

Below are the steps to get started with the Telstra Messaging API.

  1. Generate OAuth2 Token using your Client key and Client secret.
  2. Create Subscription in order to receive a provisioned number.
  3. Send Message to a specific mobile number.

Run in Postman

\"Run

Sample Apps

- Perl Sample App - Happy Chat App - PHP Sample App

SDK repos

- Messaging API - PHP SDK - Messaging API - Python SDK - Messaging API - Ruby SDK - Messaging API - NodeJS SDK - Messaging API - .Net2 SDK - Messaging API - Java SDK # Delivery Notification The API provides several methods for notifying when a message has been delivered to the destination.
  1. When you provision a number there is an opportunity to specify a notifyURL, when the message has been delivered the API will make a call to this URL to advise of the message status. If this is not provided then you can make use the Get Replies API to poll for messages.
  2. If you do not specify a URL you can always call the GET /sms API get the latest replies to the message.
Please note that the notification URLs and the polling call are exclusive. If a notification URL has been set then the polling call will not provide any useful information.

Notification URL Format

When a message has reached its final state, the API will send a POST to the URL that has been previously specified.

Notification URL Format for SMS

{     to: '+61418123456'     sentTimestamp: '2017-03-17T10:05:22+10:00'     receivedTimestamp: '2017-03-17T10:05:23+10:00'     messageId: /cccb284200035236000000000ee9d074019e0301/1261418123456     deliveryStatus: DELIVRD   } 
\\ The fields are:
Field Description
to The number the message was sent to.
receivedTimestamp Time the message was sent to the API.
sentTimestamp Time handling of the message ended.
deliveryStatus The final state of the message.
messageId The same reference that was returned when the original message was sent.
receivedTimestamp Time the message was sent to the API.
Upon receiving this call it is expected that your servers will give a 204 (No Content) response. Anything else will cause the API to reattempt the call 5 minutes later.

Notification URL Format for SMS Replies

{     \"status\": \"RECEIVED\"     \"destinationAddress\": \"+61418123456\"     \"senderAddress\": \"+61421987654\"     \"message\": \"Foo\"             \"sentTimestamp\": \"2018-03-23T12:10:06+10:00\"   }                              
\\ The fields are:
Field Description
status The final state of the message.
destinationAddress The number the message was sent to.
senderAddress The number the message was sent from.
message The sontent of the SMS reply.
sentTimestamp Time handling of the message ended.

Notification URL Format for MMS Replies

{     \"status\": \"RECEIVED\",     \"destinationAddress\": \"+61418123456\",     \"senderAddress\": \"+61421987654\",     \"subject\": \"Foo\",     \"sentTimestamp\": \"2018-03-23T12:15:45+10:00\",     \"envelope\": \"string\",     \"MMSContent\":      [       {         \"type\": \"application/smil\",         \"filename\": \"smil.xml\",         \"payload\": \"string\"       },        {         \"type\": \"image/jpeg\",         \"filename\": \"sample.jpeg\",         \"payload\": \"string\"        }      ]    } 
\\ The fields are:
Field Description
status The final state of the message.
destinationAddress The number the message was sent to.
senderAddress The number the message was sent from.
subject The subject assigned to the message.
sentTimestamp Time handling of the message ended.
envelope Information about about terminal type and originating operator.
MMSContent An array of the actual content of the reply message.
type The content type of the message.
filename The filename for the message content.
payload The content of the message.
# Frequently Asked Questions **Q: Can I send a broadcast message using the Telstra Messging API?** A. Yes. Recipient numbers can be in teh form of an array of strings if a broadcast message needs to be sent.

Notes

View messaging in Swagger UI # noqa: E501 + # Introduction Send and receive SMS and MMS messages globally using Telstra’s enterprise grade Messaging API. It also allows your application to track the delivery status of both sent and received messages. Get your dedicated Australian number, and start sending and receiving messages today. # Features The Telstra Messaging API provides the features below. | Feature | Description | | --- | --- | | `Dedicated Number` | Provision a mobile number for your account to be used as `from` address in the API | | `Send Messages` | Sending SMS or MMS messages | | `Receive Messages` | Telstra will deliver messages sent to a dedicated number or to the `notifyURL` defined by you | | `Broadcast Messages` | Invoke a single API call to send a message to a list of numbers provided in `to` | | `Delivery Status` | Query the delivery status of your messages | | `Callbacks` | Provide a notification URL and Telstra will notify your app when a message status changes | | `Alphanumeric Identifier` | Differentiate yourself by providing an alphanumeric string in `from`. This feature is only available on paid plans | | `Concatenation` | Send messages up to 1900 characters long and Telstra will automaticaly segment and reassemble them | | `Reply Request` | Create a chat session by associating `messageId` and `to` number to track responses received from a mobile number. We will store this association for 8 days | | `Character set` | Accepts all Unicode characters as part of UTF-8 | | `Bounce-back response` | See if your SMS hits an unreachable or unallocated number (Australia Only) | | `Queuing` | Messaging API will automatically queue and deliver each message at a compliant rate. | | `Emoji Encoding` | The API supports the encoding of the full range of emojis. Emojis in the reply messages will be in their UTF-8 format. | ## Delivery Notification or Callbacks The API provides several methods for notifying when a message has been delivered to the destination. 1. When you send a message there is an opportunity to specify a `notifyURL`. Once the message has been delivered the API will make a call to this URL to advise of the message status. 2. If you do not specify a URL you can always call the `GET /status` API to get the status of the message. # Getting Access to the API 1. Register at [https://dev.telstra.com](https://dev.telstra.com). 2. After registration, login to [https://dev.telstra.com](https://dev.telstra.com) and navigate to the **My apps** page. 3. Create your application by clicking the **Add new app** button 4. Select **API Free Trial** Product when configuring your application. This Product includes the Telstra Messaging API as well as other free trial APIs. Your application will be approved automatically. 5. There is a maximum of 1000 free messages per developer. Additional messages and features can be purchased from [https://dev.telstra.com](https://dev.telstra.com). 6. Note your `Client key` and `Client secret` as these will be needed to provision a number for your application and for authentication. Now head over to **Getting Started** where you can find a postman collection as well as some links to sample apps and SDKs to get you started. Happy Messaging! # Frequently Asked Questions **Q: Is creating a subscription via the Provisioning call a required step?** A. Yes. You will only be able to start sending messages if you have a provisioned dedicated number. Use Provisioning to create a dedicated number subscription, or renew your dedicated number if it has expired. **Q: When trying to send an SMS I receive a `400 Bad Request` response. How can I fix this?** A. You need to make sure you have a provisioned dedicated number before you can send an SMS. If you do not have a provisioned dedicated number and you try to send a message via the API, you will get the error below in the response:
{   \"status\":\"400\",   \"code\":\"DELIVERY-IMPOSSIBLE\",   \"message\":\"Invalid \\'from\\' address specified\" }
Use Provisioning to create a dedicated number subscription, or renew your dedicated number if it has expired. **Q: Can I send a broadcast message using the Telstra Messaging API?** A. Yes. Recipient numbers can be in the form of an array of strings if a broadcast message needs to be sent, allowing you to send to multiple mobile numbers in one API call. A sample request body for this will be: `{\"to\":[\"+61412345678\",\"+61487654321\"],\"body\":\"Test Message\"}` **Q: Can I use `Alphanumeric Identifier` from my paid plan via credit card?** A. `Alphanumeric Identifier` is only available on Telstra Account paid plans, not through credit card paid plans. **Q: How long does my dedicated number stay active for?** A. When you provision a dedicated number, by default it will be active for 30-days. You can use the `activeDays` parameter during the provisioning call to increment or decrement the number of days your dedicated number will remain active. **Q: What is the maximum sized MMS that I can send?** A. This will depend on the carrier that will receive the MMS. For Telstra it's up to 2MB, Optus up to 1.5MB and Vodafone only allows up to 500kB. You will need to check with international carriers for thier MMS size limits. **Q: Are SMILs supported by the Messaging API?** A. While there will be no error if you send an MMS with a SMIL presentation, the actual layout or sequence defined in the SMIL may not display as expected because most of the new smartphone devices ignore the SMIL presentation layer. SMIL was used in feature phones which had limited capability and SMIL allowed a *powerpoint type* presentation to be provided. Smartphones now have the capability to display video which is the better option for presentations. It is recommended that MMS messages should just drop the SMIL. **Q: How do I assign a delivery notification or callback URL?** A. You can assign a delivery notification or callback URL by adding the `notifyURL` parameter in the body of the request when you send a message. Once the message has been delivered, a notification will then be posted to this callback URL. **Q: What is the difference between the `notifyURL` parameter in the Provisoning call versus the `notifyURL` parameter in the Send Message call?** A. The `notifyURL` in the Provisoning call will be the URL where replies to the provisioned number will be posted. On the other hand, the `notifyURL` in the Send Message call will be the URL where the delivery notification will be posted, e.g. when an SMS has already been delivered to the recipient. # Getting Started Below are the steps to get started with the Telstra Messaging API. 1. Generate an OAuth2 token using your `Client key` and `Client secret`. 2. Use the Provisioning call to create a subscription and receive a dedicated number. 3. Send a message to a specific mobile number. ## Run in Postman \"Run ## Sample Apps - [Perl Sample App](https://github.com/telstra/MessagingAPI-perl-sample-app) - [Happy Chat App](https://github.com/telstra/messaging-sample-code-happy-chat) - [PHP Sample App](https://github.com/developersteve/telstra-messaging-php) ## SDK Repos - [Messaging API - PHP SDK](https://github.com/telstra/MessagingAPI-SDK-php) - [Messaging API - Python SDK](https://github.com/telstra/MessagingAPI-SDK-python) - [Messaging API - Ruby SDK](https://github.com/telstra/MessagingAPI-SDK-ruby) - [Messaging API - NodeJS SDK](https://github.com/telstra/MessagingAPI-SDK-node) - [Messaging API - .Net2 SDK](https://github.com/telstra/MessagingAPI-SDK-dotnet) - [Messaging API - Java SDK](https://github.com/telstra/MessagingAPI-SDK-Java) ## Blog Posts For more information on the Messaging API, you can read these blog posts: - [Callbacks Part 1](https://dev.telstra.com/content/understanding-messaging-api-callbacks-part-1) - [Callbacks Part 2](https://dev.telstra.com/content/understanding-messaging-api-callbacks-part-2) # noqa: E501 OpenAPI spec version: 2.2.6 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,19 +17,20 @@ class GetSubscriptionResponse(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { 'active_days': 'str', 'notify_url': 'str', 'destination_address': 'str' @@ -43,7 +43,7 @@ class GetSubscriptionResponse(object): } def __init__(self, active_days=None, notify_url=None, destination_address=None): # noqa: E501 - """GetSubscriptionResponse - a model defined in Swagger""" # noqa: E501 + """GetSubscriptionResponse - a model defined in OpenAPI""" # noqa: E501 self._active_days = None self._notify_url = None @@ -130,7 +130,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/Telstra_Messaging/models/inbound_poll_response.py b/Telstra_Messaging/models/inbound_poll_response.py index 78bc477..16f7a5f 100644 --- a/Telstra_Messaging/models/inbound_poll_response.py +++ b/Telstra_Messaging/models/inbound_poll_response.py @@ -3,11 +3,10 @@ """ Telstra Messaging API - # Introduction Send and receive SMS and MMS messages globally using Telstra’s enterprise grade Messaging API. It also allows your application to track the delivery status of both sent and received messages. Get your dedicated Australian number, and start sending and receiving messages today. # Features

The Telstra Messaging API provides the features below.
Feature Description
Dedicated Number Provision a mobile number for your account to be used as from address in the API
Send Messages Sending SMS or MMS messages
Receive Messages Telstra will deliver messages sent to a dedicated number or to the notifyURL defined by you
Broadcast Messages Invoke a single API to send a message to a list of number provided in to
Delivery Status Query the delivery status of your messages
Callbacks Provide a notification URL and Telstra will notify your app when messages status changes
Alphanumeric Identifier Differentiate yourself by providing an alphanumeric string in from. This feature is only available on paid plans
Concatenation Send messages up to 1900 characters long and Telstra will automaticaly segment and reassemble them
Reply Request Create a chat session by associating messageId and to number to track responses received from a mobile number. We will store this association for 8 days
Character set Accepts all Unicode characters as part of UTF-8
Bounce-back response See if your SMS hits an unreachable or unallocated number (Australia Only)
Queuing Messaging API will automatically queue and deliver each message at a compliant rate.
Emoji Encoding The API supports the encoding of the full range of emojis. Emojis in the reply messages will be in their UTF-8 format.
# Getting Access to the API

  1. Register at https://dev.telstra.com.
  2. After registration, login to https://dev.telstra.com and navigate to the "My apps" page.
  3. Create your application by clicking the "Add new app" button
  4. Select "API Free Trial" Product when configuring your application. This Product includes the Telstra Messaging API as well as other APIs. Your application will be approved automatically.
  5. There is a maximum of 1000 free messages per developer. Additional messages and features can be purchased from https://dev.telstra.com.
  6. Note your Client key and Client secret as these will be needed to provision a number for your application and for authentication.

Now head over to Getting Started where you can find a postman collection as well as some links to sample apps and SDKs to get you started.

Happy Messaging! # Getting Started

Below are the steps to get started with the Telstra Messaging API.

  1. Generate OAuth2 Token using your Client key and Client secret.
  2. Create Subscription in order to receive a provisioned number.
  3. Send Message to a specific mobile number.

Run in Postman

\"Run

Sample Apps

- Perl Sample App - Happy Chat App - PHP Sample App

SDK repos

- Messaging API - PHP SDK - Messaging API - Python SDK - Messaging API - Ruby SDK - Messaging API - NodeJS SDK - Messaging API - .Net2 SDK - Messaging API - Java SDK # Delivery Notification The API provides several methods for notifying when a message has been delivered to the destination.
  1. When you provision a number there is an opportunity to specify a notifyURL, when the message has been delivered the API will make a call to this URL to advise of the message status. If this is not provided then you can make use the Get Replies API to poll for messages.
  2. If you do not specify a URL you can always call the GET /sms API get the latest replies to the message.
Please note that the notification URLs and the polling call are exclusive. If a notification URL has been set then the polling call will not provide any useful information.

Notification URL Format

When a message has reached its final state, the API will send a POST to the URL that has been previously specified.

Notification URL Format for SMS

{     to: '+61418123456'     sentTimestamp: '2017-03-17T10:05:22+10:00'     receivedTimestamp: '2017-03-17T10:05:23+10:00'     messageId: /cccb284200035236000000000ee9d074019e0301/1261418123456     deliveryStatus: DELIVRD   } 
\\ The fields are:
Field Description
to The number the message was sent to.
receivedTimestamp Time the message was sent to the API.
sentTimestamp Time handling of the message ended.
deliveryStatus The final state of the message.
messageId The same reference that was returned when the original message was sent.
receivedTimestamp Time the message was sent to the API.
Upon receiving this call it is expected that your servers will give a 204 (No Content) response. Anything else will cause the API to reattempt the call 5 minutes later.

Notification URL Format for SMS Replies

{     \"status\": \"RECEIVED\"     \"destinationAddress\": \"+61418123456\"     \"senderAddress\": \"+61421987654\"     \"message\": \"Foo\"             \"sentTimestamp\": \"2018-03-23T12:10:06+10:00\"   }                              
\\ The fields are:
Field Description
status The final state of the message.
destinationAddress The number the message was sent to.
senderAddress The number the message was sent from.
message The sontent of the SMS reply.
sentTimestamp Time handling of the message ended.

Notification URL Format for MMS Replies

{     \"status\": \"RECEIVED\",     \"destinationAddress\": \"+61418123456\",     \"senderAddress\": \"+61421987654\",     \"subject\": \"Foo\",     \"sentTimestamp\": \"2018-03-23T12:15:45+10:00\",     \"envelope\": \"string\",     \"MMSContent\":      [       {         \"type\": \"application/smil\",         \"filename\": \"smil.xml\",         \"payload\": \"string\"       },        {         \"type\": \"image/jpeg\",         \"filename\": \"sample.jpeg\",         \"payload\": \"string\"        }      ]    } 
\\ The fields are:
Field Description
status The final state of the message.
destinationAddress The number the message was sent to.
senderAddress The number the message was sent from.
subject The subject assigned to the message.
sentTimestamp Time handling of the message ended.
envelope Information about about terminal type and originating operator.
MMSContent An array of the actual content of the reply message.
type The content type of the message.
filename The filename for the message content.
payload The content of the message.
# Frequently Asked Questions **Q: Can I send a broadcast message using the Telstra Messging API?** A. Yes. Recipient numbers can be in teh form of an array of strings if a broadcast message needs to be sent.

Notes

View messaging in Swagger UI # noqa: E501 + # Introduction Send and receive SMS and MMS messages globally using Telstra’s enterprise grade Messaging API. It also allows your application to track the delivery status of both sent and received messages. Get your dedicated Australian number, and start sending and receiving messages today. # Features The Telstra Messaging API provides the features below. | Feature | Description | | --- | --- | | `Dedicated Number` | Provision a mobile number for your account to be used as `from` address in the API | | `Send Messages` | Sending SMS or MMS messages | | `Receive Messages` | Telstra will deliver messages sent to a dedicated number or to the `notifyURL` defined by you | | `Broadcast Messages` | Invoke a single API call to send a message to a list of numbers provided in `to` | | `Delivery Status` | Query the delivery status of your messages | | `Callbacks` | Provide a notification URL and Telstra will notify your app when a message status changes | | `Alphanumeric Identifier` | Differentiate yourself by providing an alphanumeric string in `from`. This feature is only available on paid plans | | `Concatenation` | Send messages up to 1900 characters long and Telstra will automaticaly segment and reassemble them | | `Reply Request` | Create a chat session by associating `messageId` and `to` number to track responses received from a mobile number. We will store this association for 8 days | | `Character set` | Accepts all Unicode characters as part of UTF-8 | | `Bounce-back response` | See if your SMS hits an unreachable or unallocated number (Australia Only) | | `Queuing` | Messaging API will automatically queue and deliver each message at a compliant rate. | | `Emoji Encoding` | The API supports the encoding of the full range of emojis. Emojis in the reply messages will be in their UTF-8 format. | ## Delivery Notification or Callbacks The API provides several methods for notifying when a message has been delivered to the destination. 1. When you send a message there is an opportunity to specify a `notifyURL`. Once the message has been delivered the API will make a call to this URL to advise of the message status. 2. If you do not specify a URL you can always call the `GET /status` API to get the status of the message. # Getting Access to the API 1. Register at [https://dev.telstra.com](https://dev.telstra.com). 2. After registration, login to [https://dev.telstra.com](https://dev.telstra.com) and navigate to the **My apps** page. 3. Create your application by clicking the **Add new app** button 4. Select **API Free Trial** Product when configuring your application. This Product includes the Telstra Messaging API as well as other free trial APIs. Your application will be approved automatically. 5. There is a maximum of 1000 free messages per developer. Additional messages and features can be purchased from [https://dev.telstra.com](https://dev.telstra.com). 6. Note your `Client key` and `Client secret` as these will be needed to provision a number for your application and for authentication. Now head over to **Getting Started** where you can find a postman collection as well as some links to sample apps and SDKs to get you started. Happy Messaging! # Frequently Asked Questions **Q: Is creating a subscription via the Provisioning call a required step?** A. Yes. You will only be able to start sending messages if you have a provisioned dedicated number. Use Provisioning to create a dedicated number subscription, or renew your dedicated number if it has expired. **Q: When trying to send an SMS I receive a `400 Bad Request` response. How can I fix this?** A. You need to make sure you have a provisioned dedicated number before you can send an SMS. If you do not have a provisioned dedicated number and you try to send a message via the API, you will get the error below in the response:
{   \"status\":\"400\",   \"code\":\"DELIVERY-IMPOSSIBLE\",   \"message\":\"Invalid \\'from\\' address specified\" }
Use Provisioning to create a dedicated number subscription, or renew your dedicated number if it has expired. **Q: Can I send a broadcast message using the Telstra Messaging API?** A. Yes. Recipient numbers can be in the form of an array of strings if a broadcast message needs to be sent, allowing you to send to multiple mobile numbers in one API call. A sample request body for this will be: `{\"to\":[\"+61412345678\",\"+61487654321\"],\"body\":\"Test Message\"}` **Q: Can I use `Alphanumeric Identifier` from my paid plan via credit card?** A. `Alphanumeric Identifier` is only available on Telstra Account paid plans, not through credit card paid plans. **Q: How long does my dedicated number stay active for?** A. When you provision a dedicated number, by default it will be active for 30-days. You can use the `activeDays` parameter during the provisioning call to increment or decrement the number of days your dedicated number will remain active. **Q: What is the maximum sized MMS that I can send?** A. This will depend on the carrier that will receive the MMS. For Telstra it's up to 2MB, Optus up to 1.5MB and Vodafone only allows up to 500kB. You will need to check with international carriers for thier MMS size limits. **Q: Are SMILs supported by the Messaging API?** A. While there will be no error if you send an MMS with a SMIL presentation, the actual layout or sequence defined in the SMIL may not display as expected because most of the new smartphone devices ignore the SMIL presentation layer. SMIL was used in feature phones which had limited capability and SMIL allowed a *powerpoint type* presentation to be provided. Smartphones now have the capability to display video which is the better option for presentations. It is recommended that MMS messages should just drop the SMIL. **Q: How do I assign a delivery notification or callback URL?** A. You can assign a delivery notification or callback URL by adding the `notifyURL` parameter in the body of the request when you send a message. Once the message has been delivered, a notification will then be posted to this callback URL. **Q: What is the difference between the `notifyURL` parameter in the Provisoning call versus the `notifyURL` parameter in the Send Message call?** A. The `notifyURL` in the Provisoning call will be the URL where replies to the provisioned number will be posted. On the other hand, the `notifyURL` in the Send Message call will be the URL where the delivery notification will be posted, e.g. when an SMS has already been delivered to the recipient. # Getting Started Below are the steps to get started with the Telstra Messaging API. 1. Generate an OAuth2 token using your `Client key` and `Client secret`. 2. Use the Provisioning call to create a subscription and receive a dedicated number. 3. Send a message to a specific mobile number. ## Run in Postman \"Run ## Sample Apps - [Perl Sample App](https://github.com/telstra/MessagingAPI-perl-sample-app) - [Happy Chat App](https://github.com/telstra/messaging-sample-code-happy-chat) - [PHP Sample App](https://github.com/developersteve/telstra-messaging-php) ## SDK Repos - [Messaging API - PHP SDK](https://github.com/telstra/MessagingAPI-SDK-php) - [Messaging API - Python SDK](https://github.com/telstra/MessagingAPI-SDK-python) - [Messaging API - Ruby SDK](https://github.com/telstra/MessagingAPI-SDK-ruby) - [Messaging API - NodeJS SDK](https://github.com/telstra/MessagingAPI-SDK-node) - [Messaging API - .Net2 SDK](https://github.com/telstra/MessagingAPI-SDK-dotnet) - [Messaging API - Java SDK](https://github.com/telstra/MessagingAPI-SDK-Java) ## Blog Posts For more information on the Messaging API, you can read these blog posts: - [Callbacks Part 1](https://dev.telstra.com/content/understanding-messaging-api-callbacks-part-1) - [Callbacks Part 2](https://dev.telstra.com/content/understanding-messaging-api-callbacks-part-2) # noqa: E501 OpenAPI spec version: 2.2.6 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,19 +17,20 @@ class InboundPollResponse(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { 'status': 'str', 'destination_address': 'str', 'sender_address': 'str', @@ -49,7 +49,7 @@ class InboundPollResponse(object): } def __init__(self, status=None, destination_address=None, sender_address=None, message=None, message_id=None, sent_timestamp=None): # noqa: E501 - """InboundPollResponse - a model defined in Swagger""" # noqa: E501 + """InboundPollResponse - a model defined in OpenAPI""" # noqa: E501 self._status = None self._destination_address = None @@ -99,7 +99,7 @@ def status(self, status): def destination_address(self): """Gets the destination_address of this InboundPollResponse. # noqa: E501 - The phone number (recipient) that the message was sent to(in E.164 format). # noqa: E501 + The phone number (recipient) that the message was sent to (in E.164 format). # noqa: E501 :return: The destination_address of this InboundPollResponse. # noqa: E501 :rtype: str @@ -110,7 +110,7 @@ def destination_address(self): def destination_address(self, destination_address): """Sets the destination_address of this InboundPollResponse. - The phone number (recipient) that the message was sent to(in E.164 format). # noqa: E501 + The phone number (recipient) that the message was sent to (in E.164 format). # noqa: E501 :param destination_address: The destination_address of this InboundPollResponse. # noqa: E501 :type: str @@ -122,7 +122,7 @@ def destination_address(self, destination_address): def sender_address(self): """Gets the sender_address of this InboundPollResponse. # noqa: E501 - The phone number (sender) that the message was sent from (in E.164 format). # noqa: E501 + The phone number (sender) that the message was sent from (in E.164 format). # noqa: E501 :return: The sender_address of this InboundPollResponse. # noqa: E501 :rtype: str @@ -133,7 +133,7 @@ def sender_address(self): def sender_address(self, sender_address): """Sets the sender_address of this InboundPollResponse. - The phone number (sender) that the message was sent from (in E.164 format). # noqa: E501 + The phone number (sender) that the message was sent from (in E.164 format). # noqa: E501 :param sender_address: The sender_address of this InboundPollResponse. # noqa: E501 :type: str @@ -214,7 +214,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/Telstra_Messaging/models/message.py b/Telstra_Messaging/models/message.py index 26d511c..20142d0 100644 --- a/Telstra_Messaging/models/message.py +++ b/Telstra_Messaging/models/message.py @@ -3,11 +3,10 @@ """ Telstra Messaging API - # Introduction Send and receive SMS and MMS messages globally using Telstra’s enterprise grade Messaging API. It also allows your application to track the delivery status of both sent and received messages. Get your dedicated Australian number, and start sending and receiving messages today. # Features

The Telstra Messaging API provides the features below.
Feature Description
Dedicated Number Provision a mobile number for your account to be used as from address in the API
Send Messages Sending SMS or MMS messages
Receive Messages Telstra will deliver messages sent to a dedicated number or to the notifyURL defined by you
Broadcast Messages Invoke a single API to send a message to a list of number provided in to
Delivery Status Query the delivery status of your messages
Callbacks Provide a notification URL and Telstra will notify your app when messages status changes
Alphanumeric Identifier Differentiate yourself by providing an alphanumeric string in from. This feature is only available on paid plans
Concatenation Send messages up to 1900 characters long and Telstra will automaticaly segment and reassemble them
Reply Request Create a chat session by associating messageId and to number to track responses received from a mobile number. We will store this association for 8 days
Character set Accepts all Unicode characters as part of UTF-8
Bounce-back response See if your SMS hits an unreachable or unallocated number (Australia Only)
Queuing Messaging API will automatically queue and deliver each message at a compliant rate.
Emoji Encoding The API supports the encoding of the full range of emojis. Emojis in the reply messages will be in their UTF-8 format.
# Getting Access to the API

  1. Register at https://dev.telstra.com.
  2. After registration, login to https://dev.telstra.com and navigate to the "My apps" page.
  3. Create your application by clicking the "Add new app" button
  4. Select "API Free Trial" Product when configuring your application. This Product includes the Telstra Messaging API as well as other APIs. Your application will be approved automatically.
  5. There is a maximum of 1000 free messages per developer. Additional messages and features can be purchased from https://dev.telstra.com.
  6. Note your Client key and Client secret as these will be needed to provision a number for your application and for authentication.

Now head over to Getting Started where you can find a postman collection as well as some links to sample apps and SDKs to get you started.

Happy Messaging! # Getting Started

Below are the steps to get started with the Telstra Messaging API.

  1. Generate OAuth2 Token using your Client key and Client secret.
  2. Create Subscription in order to receive a provisioned number.
  3. Send Message to a specific mobile number.

Run in Postman

\"Run

Sample Apps

- Perl Sample App - Happy Chat App - PHP Sample App

SDK repos

- Messaging API - PHP SDK - Messaging API - Python SDK - Messaging API - Ruby SDK - Messaging API - NodeJS SDK - Messaging API - .Net2 SDK - Messaging API - Java SDK # Delivery Notification The API provides several methods for notifying when a message has been delivered to the destination.
  1. When you provision a number there is an opportunity to specify a notifyURL, when the message has been delivered the API will make a call to this URL to advise of the message status. If this is not provided then you can make use the Get Replies API to poll for messages.
  2. If you do not specify a URL you can always call the GET /sms API get the latest replies to the message.
Please note that the notification URLs and the polling call are exclusive. If a notification URL has been set then the polling call will not provide any useful information.

Notification URL Format

When a message has reached its final state, the API will send a POST to the URL that has been previously specified.

Notification URL Format for SMS

{     to: '+61418123456'     sentTimestamp: '2017-03-17T10:05:22+10:00'     receivedTimestamp: '2017-03-17T10:05:23+10:00'     messageId: /cccb284200035236000000000ee9d074019e0301/1261418123456     deliveryStatus: DELIVRD   } 
\\ The fields are:
Field Description
to The number the message was sent to.
receivedTimestamp Time the message was sent to the API.
sentTimestamp Time handling of the message ended.
deliveryStatus The final state of the message.
messageId The same reference that was returned when the original message was sent.
receivedTimestamp Time the message was sent to the API.
Upon receiving this call it is expected that your servers will give a 204 (No Content) response. Anything else will cause the API to reattempt the call 5 minutes later.

Notification URL Format for SMS Replies

{     \"status\": \"RECEIVED\"     \"destinationAddress\": \"+61418123456\"     \"senderAddress\": \"+61421987654\"     \"message\": \"Foo\"             \"sentTimestamp\": \"2018-03-23T12:10:06+10:00\"   }                              
\\ The fields are:
Field Description
status The final state of the message.
destinationAddress The number the message was sent to.
senderAddress The number the message was sent from.
message The sontent of the SMS reply.
sentTimestamp Time handling of the message ended.

Notification URL Format for MMS Replies

{     \"status\": \"RECEIVED\",     \"destinationAddress\": \"+61418123456\",     \"senderAddress\": \"+61421987654\",     \"subject\": \"Foo\",     \"sentTimestamp\": \"2018-03-23T12:15:45+10:00\",     \"envelope\": \"string\",     \"MMSContent\":      [       {         \"type\": \"application/smil\",         \"filename\": \"smil.xml\",         \"payload\": \"string\"       },        {         \"type\": \"image/jpeg\",         \"filename\": \"sample.jpeg\",         \"payload\": \"string\"        }      ]    } 
\\ The fields are:
Field Description
status The final state of the message.
destinationAddress The number the message was sent to.
senderAddress The number the message was sent from.
subject The subject assigned to the message.
sentTimestamp Time handling of the message ended.
envelope Information about about terminal type and originating operator.
MMSContent An array of the actual content of the reply message.
type The content type of the message.
filename The filename for the message content.
payload The content of the message.
# Frequently Asked Questions **Q: Can I send a broadcast message using the Telstra Messging API?** A. Yes. Recipient numbers can be in teh form of an array of strings if a broadcast message needs to be sent.

Notes

View messaging in Swagger UI # noqa: E501 + # Introduction Send and receive SMS and MMS messages globally using Telstra’s enterprise grade Messaging API. It also allows your application to track the delivery status of both sent and received messages. Get your dedicated Australian number, and start sending and receiving messages today. # Features The Telstra Messaging API provides the features below. | Feature | Description | | --- | --- | | `Dedicated Number` | Provision a mobile number for your account to be used as `from` address in the API | | `Send Messages` | Sending SMS or MMS messages | | `Receive Messages` | Telstra will deliver messages sent to a dedicated number or to the `notifyURL` defined by you | | `Broadcast Messages` | Invoke a single API call to send a message to a list of numbers provided in `to` | | `Delivery Status` | Query the delivery status of your messages | | `Callbacks` | Provide a notification URL and Telstra will notify your app when a message status changes | | `Alphanumeric Identifier` | Differentiate yourself by providing an alphanumeric string in `from`. This feature is only available on paid plans | | `Concatenation` | Send messages up to 1900 characters long and Telstra will automaticaly segment and reassemble them | | `Reply Request` | Create a chat session by associating `messageId` and `to` number to track responses received from a mobile number. We will store this association for 8 days | | `Character set` | Accepts all Unicode characters as part of UTF-8 | | `Bounce-back response` | See if your SMS hits an unreachable or unallocated number (Australia Only) | | `Queuing` | Messaging API will automatically queue and deliver each message at a compliant rate. | | `Emoji Encoding` | The API supports the encoding of the full range of emojis. Emojis in the reply messages will be in their UTF-8 format. | ## Delivery Notification or Callbacks The API provides several methods for notifying when a message has been delivered to the destination. 1. When you send a message there is an opportunity to specify a `notifyURL`. Once the message has been delivered the API will make a call to this URL to advise of the message status. 2. If you do not specify a URL you can always call the `GET /status` API to get the status of the message. # Getting Access to the API 1. Register at [https://dev.telstra.com](https://dev.telstra.com). 2. After registration, login to [https://dev.telstra.com](https://dev.telstra.com) and navigate to the **My apps** page. 3. Create your application by clicking the **Add new app** button 4. Select **API Free Trial** Product when configuring your application. This Product includes the Telstra Messaging API as well as other free trial APIs. Your application will be approved automatically. 5. There is a maximum of 1000 free messages per developer. Additional messages and features can be purchased from [https://dev.telstra.com](https://dev.telstra.com). 6. Note your `Client key` and `Client secret` as these will be needed to provision a number for your application and for authentication. Now head over to **Getting Started** where you can find a postman collection as well as some links to sample apps and SDKs to get you started. Happy Messaging! # Frequently Asked Questions **Q: Is creating a subscription via the Provisioning call a required step?** A. Yes. You will only be able to start sending messages if you have a provisioned dedicated number. Use Provisioning to create a dedicated number subscription, or renew your dedicated number if it has expired. **Q: When trying to send an SMS I receive a `400 Bad Request` response. How can I fix this?** A. You need to make sure you have a provisioned dedicated number before you can send an SMS. If you do not have a provisioned dedicated number and you try to send a message via the API, you will get the error below in the response:
{   \"status\":\"400\",   \"code\":\"DELIVERY-IMPOSSIBLE\",   \"message\":\"Invalid \\'from\\' address specified\" }
Use Provisioning to create a dedicated number subscription, or renew your dedicated number if it has expired. **Q: Can I send a broadcast message using the Telstra Messaging API?** A. Yes. Recipient numbers can be in the form of an array of strings if a broadcast message needs to be sent, allowing you to send to multiple mobile numbers in one API call. A sample request body for this will be: `{\"to\":[\"+61412345678\",\"+61487654321\"],\"body\":\"Test Message\"}` **Q: Can I use `Alphanumeric Identifier` from my paid plan via credit card?** A. `Alphanumeric Identifier` is only available on Telstra Account paid plans, not through credit card paid plans. **Q: How long does my dedicated number stay active for?** A. When you provision a dedicated number, by default it will be active for 30-days. You can use the `activeDays` parameter during the provisioning call to increment or decrement the number of days your dedicated number will remain active. **Q: What is the maximum sized MMS that I can send?** A. This will depend on the carrier that will receive the MMS. For Telstra it's up to 2MB, Optus up to 1.5MB and Vodafone only allows up to 500kB. You will need to check with international carriers for thier MMS size limits. **Q: Are SMILs supported by the Messaging API?** A. While there will be no error if you send an MMS with a SMIL presentation, the actual layout or sequence defined in the SMIL may not display as expected because most of the new smartphone devices ignore the SMIL presentation layer. SMIL was used in feature phones which had limited capability and SMIL allowed a *powerpoint type* presentation to be provided. Smartphones now have the capability to display video which is the better option for presentations. It is recommended that MMS messages should just drop the SMIL. **Q: How do I assign a delivery notification or callback URL?** A. You can assign a delivery notification or callback URL by adding the `notifyURL` parameter in the body of the request when you send a message. Once the message has been delivered, a notification will then be posted to this callback URL. **Q: What is the difference between the `notifyURL` parameter in the Provisoning call versus the `notifyURL` parameter in the Send Message call?** A. The `notifyURL` in the Provisoning call will be the URL where replies to the provisioned number will be posted. On the other hand, the `notifyURL` in the Send Message call will be the URL where the delivery notification will be posted, e.g. when an SMS has already been delivered to the recipient. # Getting Started Below are the steps to get started with the Telstra Messaging API. 1. Generate an OAuth2 token using your `Client key` and `Client secret`. 2. Use the Provisioning call to create a subscription and receive a dedicated number. 3. Send a message to a specific mobile number. ## Run in Postman \"Run ## Sample Apps - [Perl Sample App](https://github.com/telstra/MessagingAPI-perl-sample-app) - [Happy Chat App](https://github.com/telstra/messaging-sample-code-happy-chat) - [PHP Sample App](https://github.com/developersteve/telstra-messaging-php) ## SDK Repos - [Messaging API - PHP SDK](https://github.com/telstra/MessagingAPI-SDK-php) - [Messaging API - Python SDK](https://github.com/telstra/MessagingAPI-SDK-python) - [Messaging API - Ruby SDK](https://github.com/telstra/MessagingAPI-SDK-ruby) - [Messaging API - NodeJS SDK](https://github.com/telstra/MessagingAPI-SDK-node) - [Messaging API - .Net2 SDK](https://github.com/telstra/MessagingAPI-SDK-dotnet) - [Messaging API - Java SDK](https://github.com/telstra/MessagingAPI-SDK-Java) ## Blog Posts For more information on the Messaging API, you can read these blog posts: - [Callbacks Part 1](https://dev.telstra.com/content/understanding-messaging-api-callbacks-part-1) - [Callbacks Part 2](https://dev.telstra.com/content/understanding-messaging-api-callbacks-part-2) # noqa: E501 OpenAPI spec version: 2.2.6 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,19 +17,20 @@ class Message(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { 'to': 'str', 'delivery_status': 'str', 'message_id': 'str', @@ -45,7 +45,7 @@ class Message(object): } def __init__(self, to=None, delivery_status=None, message_id=None, message_status_url=None): # noqa: E501 - """Message - a model defined in Swagger""" # noqa: E501 + """Message - a model defined in OpenAPI""" # noqa: E501 self._to = None self._delivery_status = None @@ -161,7 +161,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/Telstra_Messaging/models/message_sent_response.py b/Telstra_Messaging/models/message_sent_response.py index 4ddc764..76a87a1 100644 --- a/Telstra_Messaging/models/message_sent_response.py +++ b/Telstra_Messaging/models/message_sent_response.py @@ -3,11 +3,10 @@ """ Telstra Messaging API - # Introduction Send and receive SMS and MMS messages globally using Telstra’s enterprise grade Messaging API. It also allows your application to track the delivery status of both sent and received messages. Get your dedicated Australian number, and start sending and receiving messages today. # Features

The Telstra Messaging API provides the features below.
Feature Description
Dedicated Number Provision a mobile number for your account to be used as from address in the API
Send Messages Sending SMS or MMS messages
Receive Messages Telstra will deliver messages sent to a dedicated number or to the notifyURL defined by you
Broadcast Messages Invoke a single API to send a message to a list of number provided in to
Delivery Status Query the delivery status of your messages
Callbacks Provide a notification URL and Telstra will notify your app when messages status changes
Alphanumeric Identifier Differentiate yourself by providing an alphanumeric string in from. This feature is only available on paid plans
Concatenation Send messages up to 1900 characters long and Telstra will automaticaly segment and reassemble them
Reply Request Create a chat session by associating messageId and to number to track responses received from a mobile number. We will store this association for 8 days
Character set Accepts all Unicode characters as part of UTF-8
Bounce-back response See if your SMS hits an unreachable or unallocated number (Australia Only)
Queuing Messaging API will automatically queue and deliver each message at a compliant rate.
Emoji Encoding The API supports the encoding of the full range of emojis. Emojis in the reply messages will be in their UTF-8 format.
# Getting Access to the API

  1. Register at https://dev.telstra.com.
  2. After registration, login to https://dev.telstra.com and navigate to the "My apps" page.
  3. Create your application by clicking the "Add new app" button
  4. Select "API Free Trial" Product when configuring your application. This Product includes the Telstra Messaging API as well as other APIs. Your application will be approved automatically.
  5. There is a maximum of 1000 free messages per developer. Additional messages and features can be purchased from https://dev.telstra.com.
  6. Note your Client key and Client secret as these will be needed to provision a number for your application and for authentication.

Now head over to Getting Started where you can find a postman collection as well as some links to sample apps and SDKs to get you started.

Happy Messaging! # Getting Started

Below are the steps to get started with the Telstra Messaging API.

  1. Generate OAuth2 Token using your Client key and Client secret.
  2. Create Subscription in order to receive a provisioned number.
  3. Send Message to a specific mobile number.

Run in Postman

\"Run

Sample Apps

- Perl Sample App - Happy Chat App - PHP Sample App

SDK repos

- Messaging API - PHP SDK - Messaging API - Python SDK - Messaging API - Ruby SDK - Messaging API - NodeJS SDK - Messaging API - .Net2 SDK - Messaging API - Java SDK # Delivery Notification The API provides several methods for notifying when a message has been delivered to the destination.
  1. When you provision a number there is an opportunity to specify a notifyURL, when the message has been delivered the API will make a call to this URL to advise of the message status. If this is not provided then you can make use the Get Replies API to poll for messages.
  2. If you do not specify a URL you can always call the GET /sms API get the latest replies to the message.
Please note that the notification URLs and the polling call are exclusive. If a notification URL has been set then the polling call will not provide any useful information.

Notification URL Format

When a message has reached its final state, the API will send a POST to the URL that has been previously specified.

Notification URL Format for SMS

{     to: '+61418123456'     sentTimestamp: '2017-03-17T10:05:22+10:00'     receivedTimestamp: '2017-03-17T10:05:23+10:00'     messageId: /cccb284200035236000000000ee9d074019e0301/1261418123456     deliveryStatus: DELIVRD   } 
\\ The fields are:
Field Description
to The number the message was sent to.
receivedTimestamp Time the message was sent to the API.
sentTimestamp Time handling of the message ended.
deliveryStatus The final state of the message.
messageId The same reference that was returned when the original message was sent.
receivedTimestamp Time the message was sent to the API.
Upon receiving this call it is expected that your servers will give a 204 (No Content) response. Anything else will cause the API to reattempt the call 5 minutes later.

Notification URL Format for SMS Replies

{     \"status\": \"RECEIVED\"     \"destinationAddress\": \"+61418123456\"     \"senderAddress\": \"+61421987654\"     \"message\": \"Foo\"             \"sentTimestamp\": \"2018-03-23T12:10:06+10:00\"   }                              
\\ The fields are:
Field Description
status The final state of the message.
destinationAddress The number the message was sent to.
senderAddress The number the message was sent from.
message The sontent of the SMS reply.
sentTimestamp Time handling of the message ended.

Notification URL Format for MMS Replies

{     \"status\": \"RECEIVED\",     \"destinationAddress\": \"+61418123456\",     \"senderAddress\": \"+61421987654\",     \"subject\": \"Foo\",     \"sentTimestamp\": \"2018-03-23T12:15:45+10:00\",     \"envelope\": \"string\",     \"MMSContent\":      [       {         \"type\": \"application/smil\",         \"filename\": \"smil.xml\",         \"payload\": \"string\"       },        {         \"type\": \"image/jpeg\",         \"filename\": \"sample.jpeg\",         \"payload\": \"string\"        }      ]    } 
\\ The fields are:
Field Description
status The final state of the message.
destinationAddress The number the message was sent to.
senderAddress The number the message was sent from.
subject The subject assigned to the message.
sentTimestamp Time handling of the message ended.
envelope Information about about terminal type and originating operator.
MMSContent An array of the actual content of the reply message.
type The content type of the message.
filename The filename for the message content.
payload The content of the message.
# Frequently Asked Questions **Q: Can I send a broadcast message using the Telstra Messging API?** A. Yes. Recipient numbers can be in teh form of an array of strings if a broadcast message needs to be sent.

Notes

View messaging in Swagger UI # noqa: E501 + # Introduction Send and receive SMS and MMS messages globally using Telstra’s enterprise grade Messaging API. It also allows your application to track the delivery status of both sent and received messages. Get your dedicated Australian number, and start sending and receiving messages today. # Features The Telstra Messaging API provides the features below. | Feature | Description | | --- | --- | | `Dedicated Number` | Provision a mobile number for your account to be used as `from` address in the API | | `Send Messages` | Sending SMS or MMS messages | | `Receive Messages` | Telstra will deliver messages sent to a dedicated number or to the `notifyURL` defined by you | | `Broadcast Messages` | Invoke a single API call to send a message to a list of numbers provided in `to` | | `Delivery Status` | Query the delivery status of your messages | | `Callbacks` | Provide a notification URL and Telstra will notify your app when a message status changes | | `Alphanumeric Identifier` | Differentiate yourself by providing an alphanumeric string in `from`. This feature is only available on paid plans | | `Concatenation` | Send messages up to 1900 characters long and Telstra will automaticaly segment and reassemble them | | `Reply Request` | Create a chat session by associating `messageId` and `to` number to track responses received from a mobile number. We will store this association for 8 days | | `Character set` | Accepts all Unicode characters as part of UTF-8 | | `Bounce-back response` | See if your SMS hits an unreachable or unallocated number (Australia Only) | | `Queuing` | Messaging API will automatically queue and deliver each message at a compliant rate. | | `Emoji Encoding` | The API supports the encoding of the full range of emojis. Emojis in the reply messages will be in their UTF-8 format. | ## Delivery Notification or Callbacks The API provides several methods for notifying when a message has been delivered to the destination. 1. When you send a message there is an opportunity to specify a `notifyURL`. Once the message has been delivered the API will make a call to this URL to advise of the message status. 2. If you do not specify a URL you can always call the `GET /status` API to get the status of the message. # Getting Access to the API 1. Register at [https://dev.telstra.com](https://dev.telstra.com). 2. After registration, login to [https://dev.telstra.com](https://dev.telstra.com) and navigate to the **My apps** page. 3. Create your application by clicking the **Add new app** button 4. Select **API Free Trial** Product when configuring your application. This Product includes the Telstra Messaging API as well as other free trial APIs. Your application will be approved automatically. 5. There is a maximum of 1000 free messages per developer. Additional messages and features can be purchased from [https://dev.telstra.com](https://dev.telstra.com). 6. Note your `Client key` and `Client secret` as these will be needed to provision a number for your application and for authentication. Now head over to **Getting Started** where you can find a postman collection as well as some links to sample apps and SDKs to get you started. Happy Messaging! # Frequently Asked Questions **Q: Is creating a subscription via the Provisioning call a required step?** A. Yes. You will only be able to start sending messages if you have a provisioned dedicated number. Use Provisioning to create a dedicated number subscription, or renew your dedicated number if it has expired. **Q: When trying to send an SMS I receive a `400 Bad Request` response. How can I fix this?** A. You need to make sure you have a provisioned dedicated number before you can send an SMS. If you do not have a provisioned dedicated number and you try to send a message via the API, you will get the error below in the response:
{   \"status\":\"400\",   \"code\":\"DELIVERY-IMPOSSIBLE\",   \"message\":\"Invalid \\'from\\' address specified\" }
Use Provisioning to create a dedicated number subscription, or renew your dedicated number if it has expired. **Q: Can I send a broadcast message using the Telstra Messaging API?** A. Yes. Recipient numbers can be in the form of an array of strings if a broadcast message needs to be sent, allowing you to send to multiple mobile numbers in one API call. A sample request body for this will be: `{\"to\":[\"+61412345678\",\"+61487654321\"],\"body\":\"Test Message\"}` **Q: Can I use `Alphanumeric Identifier` from my paid plan via credit card?** A. `Alphanumeric Identifier` is only available on Telstra Account paid plans, not through credit card paid plans. **Q: How long does my dedicated number stay active for?** A. When you provision a dedicated number, by default it will be active for 30-days. You can use the `activeDays` parameter during the provisioning call to increment or decrement the number of days your dedicated number will remain active. **Q: What is the maximum sized MMS that I can send?** A. This will depend on the carrier that will receive the MMS. For Telstra it's up to 2MB, Optus up to 1.5MB and Vodafone only allows up to 500kB. You will need to check with international carriers for thier MMS size limits. **Q: Are SMILs supported by the Messaging API?** A. While there will be no error if you send an MMS with a SMIL presentation, the actual layout or sequence defined in the SMIL may not display as expected because most of the new smartphone devices ignore the SMIL presentation layer. SMIL was used in feature phones which had limited capability and SMIL allowed a *powerpoint type* presentation to be provided. Smartphones now have the capability to display video which is the better option for presentations. It is recommended that MMS messages should just drop the SMIL. **Q: How do I assign a delivery notification or callback URL?** A. You can assign a delivery notification or callback URL by adding the `notifyURL` parameter in the body of the request when you send a message. Once the message has been delivered, a notification will then be posted to this callback URL. **Q: What is the difference between the `notifyURL` parameter in the Provisoning call versus the `notifyURL` parameter in the Send Message call?** A. The `notifyURL` in the Provisoning call will be the URL where replies to the provisioned number will be posted. On the other hand, the `notifyURL` in the Send Message call will be the URL where the delivery notification will be posted, e.g. when an SMS has already been delivered to the recipient. # Getting Started Below are the steps to get started with the Telstra Messaging API. 1. Generate an OAuth2 token using your `Client key` and `Client secret`. 2. Use the Provisioning call to create a subscription and receive a dedicated number. 3. Send a message to a specific mobile number. ## Run in Postman \"Run ## Sample Apps - [Perl Sample App](https://github.com/telstra/MessagingAPI-perl-sample-app) - [Happy Chat App](https://github.com/telstra/messaging-sample-code-happy-chat) - [PHP Sample App](https://github.com/developersteve/telstra-messaging-php) ## SDK Repos - [Messaging API - PHP SDK](https://github.com/telstra/MessagingAPI-SDK-php) - [Messaging API - Python SDK](https://github.com/telstra/MessagingAPI-SDK-python) - [Messaging API - Ruby SDK](https://github.com/telstra/MessagingAPI-SDK-ruby) - [Messaging API - NodeJS SDK](https://github.com/telstra/MessagingAPI-SDK-node) - [Messaging API - .Net2 SDK](https://github.com/telstra/MessagingAPI-SDK-dotnet) - [Messaging API - Java SDK](https://github.com/telstra/MessagingAPI-SDK-Java) ## Blog Posts For more information on the Messaging API, you can read these blog posts: - [Callbacks Part 1](https://dev.telstra.com/content/understanding-messaging-api-callbacks-part-1) - [Callbacks Part 2](https://dev.telstra.com/content/understanding-messaging-api-callbacks-part-2) # noqa: E501 OpenAPI spec version: 2.2.6 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -16,23 +15,22 @@ import six -from Telstra_Messaging.models.message import Message # noqa: F401,E501 - class MessageSentResponse(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { 'messages': 'list[Message]', 'message_type': 'str', 'number_segments': 'int', @@ -49,7 +47,7 @@ class MessageSentResponse(object): } def __init__(self, messages=None, message_type=None, number_segments=None, number_national_destinations=None, number_international_destinations=None): # noqa: E501 - """MessageSentResponse - a model defined in Swagger""" # noqa: E501 + """MessageSentResponse - a model defined in OpenAPI""" # noqa: E501 self._messages = None self._message_type = None @@ -191,7 +189,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/Telstra_Messaging/models/mms_content.py b/Telstra_Messaging/models/mms_content.py index 73c7770..6dbbd8c 100644 --- a/Telstra_Messaging/models/mms_content.py +++ b/Telstra_Messaging/models/mms_content.py @@ -3,11 +3,10 @@ """ Telstra Messaging API - # Introduction Send and receive SMS and MMS messages globally using Telstra’s enterprise grade Messaging API. It also allows your application to track the delivery status of both sent and received messages. Get your dedicated Australian number, and start sending and receiving messages today. # Features

The Telstra Messaging API provides the features below.
Feature Description
Dedicated Number Provision a mobile number for your account to be used as from address in the API
Send Messages Sending SMS or MMS messages
Receive Messages Telstra will deliver messages sent to a dedicated number or to the notifyURL defined by you
Broadcast Messages Invoke a single API to send a message to a list of number provided in to
Delivery Status Query the delivery status of your messages
Callbacks Provide a notification URL and Telstra will notify your app when messages status changes
Alphanumeric Identifier Differentiate yourself by providing an alphanumeric string in from. This feature is only available on paid plans
Concatenation Send messages up to 1900 characters long and Telstra will automaticaly segment and reassemble them
Reply Request Create a chat session by associating messageId and to number to track responses received from a mobile number. We will store this association for 8 days
Character set Accepts all Unicode characters as part of UTF-8
Bounce-back response See if your SMS hits an unreachable or unallocated number (Australia Only)
Queuing Messaging API will automatically queue and deliver each message at a compliant rate.
Emoji Encoding The API supports the encoding of the full range of emojis. Emojis in the reply messages will be in their UTF-8 format.
# Getting Access to the API

  1. Register at https://dev.telstra.com.
  2. After registration, login to https://dev.telstra.com and navigate to the "My apps" page.
  3. Create your application by clicking the "Add new app" button
  4. Select "API Free Trial" Product when configuring your application. This Product includes the Telstra Messaging API as well as other APIs. Your application will be approved automatically.
  5. There is a maximum of 1000 free messages per developer. Additional messages and features can be purchased from https://dev.telstra.com.
  6. Note your Client key and Client secret as these will be needed to provision a number for your application and for authentication.

Now head over to Getting Started where you can find a postman collection as well as some links to sample apps and SDKs to get you started.

Happy Messaging! # Getting Started

Below are the steps to get started with the Telstra Messaging API.

  1. Generate OAuth2 Token using your Client key and Client secret.
  2. Create Subscription in order to receive a provisioned number.
  3. Send Message to a specific mobile number.

Run in Postman

\"Run

Sample Apps

- Perl Sample App - Happy Chat App - PHP Sample App

SDK repos

- Messaging API - PHP SDK - Messaging API - Python SDK - Messaging API - Ruby SDK - Messaging API - NodeJS SDK - Messaging API - .Net2 SDK - Messaging API - Java SDK # Delivery Notification The API provides several methods for notifying when a message has been delivered to the destination.
  1. When you provision a number there is an opportunity to specify a notifyURL, when the message has been delivered the API will make a call to this URL to advise of the message status. If this is not provided then you can make use the Get Replies API to poll for messages.
  2. If you do not specify a URL you can always call the GET /sms API get the latest replies to the message.
Please note that the notification URLs and the polling call are exclusive. If a notification URL has been set then the polling call will not provide any useful information.

Notification URL Format

When a message has reached its final state, the API will send a POST to the URL that has been previously specified.

Notification URL Format for SMS

{     to: '+61418123456'     sentTimestamp: '2017-03-17T10:05:22+10:00'     receivedTimestamp: '2017-03-17T10:05:23+10:00'     messageId: /cccb284200035236000000000ee9d074019e0301/1261418123456     deliveryStatus: DELIVRD   } 
\\ The fields are:
Field Description
to The number the message was sent to.
receivedTimestamp Time the message was sent to the API.
sentTimestamp Time handling of the message ended.
deliveryStatus The final state of the message.
messageId The same reference that was returned when the original message was sent.
receivedTimestamp Time the message was sent to the API.
Upon receiving this call it is expected that your servers will give a 204 (No Content) response. Anything else will cause the API to reattempt the call 5 minutes later.

Notification URL Format for SMS Replies

{     \"status\": \"RECEIVED\"     \"destinationAddress\": \"+61418123456\"     \"senderAddress\": \"+61421987654\"     \"message\": \"Foo\"             \"sentTimestamp\": \"2018-03-23T12:10:06+10:00\"   }                              
\\ The fields are:
Field Description
status The final state of the message.
destinationAddress The number the message was sent to.
senderAddress The number the message was sent from.
message The sontent of the SMS reply.
sentTimestamp Time handling of the message ended.

Notification URL Format for MMS Replies

{     \"status\": \"RECEIVED\",     \"destinationAddress\": \"+61418123456\",     \"senderAddress\": \"+61421987654\",     \"subject\": \"Foo\",     \"sentTimestamp\": \"2018-03-23T12:15:45+10:00\",     \"envelope\": \"string\",     \"MMSContent\":      [       {         \"type\": \"application/smil\",         \"filename\": \"smil.xml\",         \"payload\": \"string\"       },        {         \"type\": \"image/jpeg\",         \"filename\": \"sample.jpeg\",         \"payload\": \"string\"        }      ]    } 
\\ The fields are:
Field Description
status The final state of the message.
destinationAddress The number the message was sent to.
senderAddress The number the message was sent from.
subject The subject assigned to the message.
sentTimestamp Time handling of the message ended.
envelope Information about about terminal type and originating operator.
MMSContent An array of the actual content of the reply message.
type The content type of the message.
filename The filename for the message content.
payload The content of the message.
# Frequently Asked Questions **Q: Can I send a broadcast message using the Telstra Messging API?** A. Yes. Recipient numbers can be in teh form of an array of strings if a broadcast message needs to be sent.

Notes

View messaging in Swagger UI # noqa: E501 + # Introduction Send and receive SMS and MMS messages globally using Telstra’s enterprise grade Messaging API. It also allows your application to track the delivery status of both sent and received messages. Get your dedicated Australian number, and start sending and receiving messages today. # Features The Telstra Messaging API provides the features below. | Feature | Description | | --- | --- | | `Dedicated Number` | Provision a mobile number for your account to be used as `from` address in the API | | `Send Messages` | Sending SMS or MMS messages | | `Receive Messages` | Telstra will deliver messages sent to a dedicated number or to the `notifyURL` defined by you | | `Broadcast Messages` | Invoke a single API call to send a message to a list of numbers provided in `to` | | `Delivery Status` | Query the delivery status of your messages | | `Callbacks` | Provide a notification URL and Telstra will notify your app when a message status changes | | `Alphanumeric Identifier` | Differentiate yourself by providing an alphanumeric string in `from`. This feature is only available on paid plans | | `Concatenation` | Send messages up to 1900 characters long and Telstra will automaticaly segment and reassemble them | | `Reply Request` | Create a chat session by associating `messageId` and `to` number to track responses received from a mobile number. We will store this association for 8 days | | `Character set` | Accepts all Unicode characters as part of UTF-8 | | `Bounce-back response` | See if your SMS hits an unreachable or unallocated number (Australia Only) | | `Queuing` | Messaging API will automatically queue and deliver each message at a compliant rate. | | `Emoji Encoding` | The API supports the encoding of the full range of emojis. Emojis in the reply messages will be in their UTF-8 format. | ## Delivery Notification or Callbacks The API provides several methods for notifying when a message has been delivered to the destination. 1. When you send a message there is an opportunity to specify a `notifyURL`. Once the message has been delivered the API will make a call to this URL to advise of the message status. 2. If you do not specify a URL you can always call the `GET /status` API to get the status of the message. # Getting Access to the API 1. Register at [https://dev.telstra.com](https://dev.telstra.com). 2. After registration, login to [https://dev.telstra.com](https://dev.telstra.com) and navigate to the **My apps** page. 3. Create your application by clicking the **Add new app** button 4. Select **API Free Trial** Product when configuring your application. This Product includes the Telstra Messaging API as well as other free trial APIs. Your application will be approved automatically. 5. There is a maximum of 1000 free messages per developer. Additional messages and features can be purchased from [https://dev.telstra.com](https://dev.telstra.com). 6. Note your `Client key` and `Client secret` as these will be needed to provision a number for your application and for authentication. Now head over to **Getting Started** where you can find a postman collection as well as some links to sample apps and SDKs to get you started. Happy Messaging! # Frequently Asked Questions **Q: Is creating a subscription via the Provisioning call a required step?** A. Yes. You will only be able to start sending messages if you have a provisioned dedicated number. Use Provisioning to create a dedicated number subscription, or renew your dedicated number if it has expired. **Q: When trying to send an SMS I receive a `400 Bad Request` response. How can I fix this?** A. You need to make sure you have a provisioned dedicated number before you can send an SMS. If you do not have a provisioned dedicated number and you try to send a message via the API, you will get the error below in the response:
{   \"status\":\"400\",   \"code\":\"DELIVERY-IMPOSSIBLE\",   \"message\":\"Invalid \\'from\\' address specified\" }
Use Provisioning to create a dedicated number subscription, or renew your dedicated number if it has expired. **Q: Can I send a broadcast message using the Telstra Messaging API?** A. Yes. Recipient numbers can be in the form of an array of strings if a broadcast message needs to be sent, allowing you to send to multiple mobile numbers in one API call. A sample request body for this will be: `{\"to\":[\"+61412345678\",\"+61487654321\"],\"body\":\"Test Message\"}` **Q: Can I use `Alphanumeric Identifier` from my paid plan via credit card?** A. `Alphanumeric Identifier` is only available on Telstra Account paid plans, not through credit card paid plans. **Q: How long does my dedicated number stay active for?** A. When you provision a dedicated number, by default it will be active for 30-days. You can use the `activeDays` parameter during the provisioning call to increment or decrement the number of days your dedicated number will remain active. **Q: What is the maximum sized MMS that I can send?** A. This will depend on the carrier that will receive the MMS. For Telstra it's up to 2MB, Optus up to 1.5MB and Vodafone only allows up to 500kB. You will need to check with international carriers for thier MMS size limits. **Q: Are SMILs supported by the Messaging API?** A. While there will be no error if you send an MMS with a SMIL presentation, the actual layout or sequence defined in the SMIL may not display as expected because most of the new smartphone devices ignore the SMIL presentation layer. SMIL was used in feature phones which had limited capability and SMIL allowed a *powerpoint type* presentation to be provided. Smartphones now have the capability to display video which is the better option for presentations. It is recommended that MMS messages should just drop the SMIL. **Q: How do I assign a delivery notification or callback URL?** A. You can assign a delivery notification or callback URL by adding the `notifyURL` parameter in the body of the request when you send a message. Once the message has been delivered, a notification will then be posted to this callback URL. **Q: What is the difference between the `notifyURL` parameter in the Provisoning call versus the `notifyURL` parameter in the Send Message call?** A. The `notifyURL` in the Provisoning call will be the URL where replies to the provisioned number will be posted. On the other hand, the `notifyURL` in the Send Message call will be the URL where the delivery notification will be posted, e.g. when an SMS has already been delivered to the recipient. # Getting Started Below are the steps to get started with the Telstra Messaging API. 1. Generate an OAuth2 token using your `Client key` and `Client secret`. 2. Use the Provisioning call to create a subscription and receive a dedicated number. 3. Send a message to a specific mobile number. ## Run in Postman \"Run ## Sample Apps - [Perl Sample App](https://github.com/telstra/MessagingAPI-perl-sample-app) - [Happy Chat App](https://github.com/telstra/messaging-sample-code-happy-chat) - [PHP Sample App](https://github.com/developersteve/telstra-messaging-php) ## SDK Repos - [Messaging API - PHP SDK](https://github.com/telstra/MessagingAPI-SDK-php) - [Messaging API - Python SDK](https://github.com/telstra/MessagingAPI-SDK-python) - [Messaging API - Ruby SDK](https://github.com/telstra/MessagingAPI-SDK-ruby) - [Messaging API - NodeJS SDK](https://github.com/telstra/MessagingAPI-SDK-node) - [Messaging API - .Net2 SDK](https://github.com/telstra/MessagingAPI-SDK-dotnet) - [Messaging API - Java SDK](https://github.com/telstra/MessagingAPI-SDK-Java) ## Blog Posts For more information on the Messaging API, you can read these blog posts: - [Callbacks Part 1](https://dev.telstra.com/content/understanding-messaging-api-callbacks-part-1) - [Callbacks Part 2](https://dev.telstra.com/content/understanding-messaging-api-callbacks-part-2) # noqa: E501 OpenAPI spec version: 2.2.6 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,19 +17,20 @@ class MMSContent(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { 'type': 'str', 'filename': 'str', 'payload': 'str' @@ -43,7 +43,7 @@ class MMSContent(object): } def __init__(self, type=None, filename=None, payload=None): # noqa: E501 - """MMSContent - a model defined in Swagger""" # noqa: E501 + """MMSContent - a model defined in OpenAPI""" # noqa: E501 self._type = None self._filename = None @@ -58,7 +58,7 @@ def __init__(self, type=None, filename=None, payload=None): # noqa: E501 def type(self): """Gets the type of this MMSContent. # noqa: E501 - The following types are supported audio/amr audio/aac audio/mp3 audio/mpeg3 audio/mpeg audio/mpg audio/wav audio/3gpp audio/mp4 image/gif image/jpeg image/jpg image/png image/bmp video/mpeg4 video/mp4 video/mpeg video/3gpp video/3gp video/h263 text/plain text/x-vCard text/x-vCalendar # noqa: E501 + The following types are supported audio/amr audio/aac audio/mp3 audio/mpeg3 audio/mpeg audio/mpg audio/wav audio/3gpp audio/mp4 image/gif image/jpeg image/jpg image/png image/bmp video/mpeg4 video/mp4 video/mpeg video/3gpp video/3gp video/h263 text/plain text/x-vCard text/x-vCalendar\" # noqa: E501 :return: The type of this MMSContent. # noqa: E501 :rtype: str @@ -69,7 +69,7 @@ def type(self): def type(self, type): """Sets the type of this MMSContent. - The following types are supported audio/amr audio/aac audio/mp3 audio/mpeg3 audio/mpeg audio/mpg audio/wav audio/3gpp audio/mp4 image/gif image/jpeg image/jpg image/png image/bmp video/mpeg4 video/mp4 video/mpeg video/3gpp video/3gp video/h263 text/plain text/x-vCard text/x-vCalendar # noqa: E501 + The following types are supported audio/amr audio/aac audio/mp3 audio/mpeg3 audio/mpeg audio/mpg audio/wav audio/3gpp audio/mp4 image/gif image/jpeg image/jpg image/png image/bmp video/mpeg4 video/mp4 video/mpeg video/3gpp video/3gp video/h263 text/plain text/x-vCard text/x-vCalendar\" # noqa: E501 :param type: The type of this MMSContent. # noqa: E501 :type: str @@ -133,7 +133,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/Telstra_Messaging/models/o_auth_response.py b/Telstra_Messaging/models/o_auth_response.py index 2f954cb..f0b5856 100644 --- a/Telstra_Messaging/models/o_auth_response.py +++ b/Telstra_Messaging/models/o_auth_response.py @@ -3,11 +3,10 @@ """ Telstra Messaging API - # Introduction Send and receive SMS and MMS messages globally using Telstra’s enterprise grade Messaging API. It also allows your application to track the delivery status of both sent and received messages. Get your dedicated Australian number, and start sending and receiving messages today. # Features

The Telstra Messaging API provides the features below.
Feature Description
Dedicated Number Provision a mobile number for your account to be used as from address in the API
Send Messages Sending SMS or MMS messages
Receive Messages Telstra will deliver messages sent to a dedicated number or to the notifyURL defined by you
Broadcast Messages Invoke a single API to send a message to a list of number provided in to
Delivery Status Query the delivery status of your messages
Callbacks Provide a notification URL and Telstra will notify your app when messages status changes
Alphanumeric Identifier Differentiate yourself by providing an alphanumeric string in from. This feature is only available on paid plans
Concatenation Send messages up to 1900 characters long and Telstra will automaticaly segment and reassemble them
Reply Request Create a chat session by associating messageId and to number to track responses received from a mobile number. We will store this association for 8 days
Character set Accepts all Unicode characters as part of UTF-8
Bounce-back response See if your SMS hits an unreachable or unallocated number (Australia Only)
Queuing Messaging API will automatically queue and deliver each message at a compliant rate.
Emoji Encoding The API supports the encoding of the full range of emojis. Emojis in the reply messages will be in their UTF-8 format.
# Getting Access to the API

  1. Register at https://dev.telstra.com.
  2. After registration, login to https://dev.telstra.com and navigate to the "My apps" page.
  3. Create your application by clicking the "Add new app" button
  4. Select "API Free Trial" Product when configuring your application. This Product includes the Telstra Messaging API as well as other APIs. Your application will be approved automatically.
  5. There is a maximum of 1000 free messages per developer. Additional messages and features can be purchased from https://dev.telstra.com.
  6. Note your Client key and Client secret as these will be needed to provision a number for your application and for authentication.

Now head over to Getting Started where you can find a postman collection as well as some links to sample apps and SDKs to get you started.

Happy Messaging! # Getting Started

Below are the steps to get started with the Telstra Messaging API.

  1. Generate OAuth2 Token using your Client key and Client secret.
  2. Create Subscription in order to receive a provisioned number.
  3. Send Message to a specific mobile number.

Run in Postman

\"Run

Sample Apps

- Perl Sample App - Happy Chat App - PHP Sample App

SDK repos

- Messaging API - PHP SDK - Messaging API - Python SDK - Messaging API - Ruby SDK - Messaging API - NodeJS SDK - Messaging API - .Net2 SDK - Messaging API - Java SDK # Delivery Notification The API provides several methods for notifying when a message has been delivered to the destination.
  1. When you provision a number there is an opportunity to specify a notifyURL, when the message has been delivered the API will make a call to this URL to advise of the message status. If this is not provided then you can make use the Get Replies API to poll for messages.
  2. If you do not specify a URL you can always call the GET /sms API get the latest replies to the message.
Please note that the notification URLs and the polling call are exclusive. If a notification URL has been set then the polling call will not provide any useful information.

Notification URL Format

When a message has reached its final state, the API will send a POST to the URL that has been previously specified.

Notification URL Format for SMS

{     to: '+61418123456'     sentTimestamp: '2017-03-17T10:05:22+10:00'     receivedTimestamp: '2017-03-17T10:05:23+10:00'     messageId: /cccb284200035236000000000ee9d074019e0301/1261418123456     deliveryStatus: DELIVRD   } 
\\ The fields are:
Field Description
to The number the message was sent to.
receivedTimestamp Time the message was sent to the API.
sentTimestamp Time handling of the message ended.
deliveryStatus The final state of the message.
messageId The same reference that was returned when the original message was sent.
receivedTimestamp Time the message was sent to the API.
Upon receiving this call it is expected that your servers will give a 204 (No Content) response. Anything else will cause the API to reattempt the call 5 minutes later.

Notification URL Format for SMS Replies

{     \"status\": \"RECEIVED\"     \"destinationAddress\": \"+61418123456\"     \"senderAddress\": \"+61421987654\"     \"message\": \"Foo\"             \"sentTimestamp\": \"2018-03-23T12:10:06+10:00\"   }                              
\\ The fields are:
Field Description
status The final state of the message.
destinationAddress The number the message was sent to.
senderAddress The number the message was sent from.
message The sontent of the SMS reply.
sentTimestamp Time handling of the message ended.

Notification URL Format for MMS Replies

{     \"status\": \"RECEIVED\",     \"destinationAddress\": \"+61418123456\",     \"senderAddress\": \"+61421987654\",     \"subject\": \"Foo\",     \"sentTimestamp\": \"2018-03-23T12:15:45+10:00\",     \"envelope\": \"string\",     \"MMSContent\":      [       {         \"type\": \"application/smil\",         \"filename\": \"smil.xml\",         \"payload\": \"string\"       },        {         \"type\": \"image/jpeg\",         \"filename\": \"sample.jpeg\",         \"payload\": \"string\"        }      ]    } 
\\ The fields are:
Field Description
status The final state of the message.
destinationAddress The number the message was sent to.
senderAddress The number the message was sent from.
subject The subject assigned to the message.
sentTimestamp Time handling of the message ended.
envelope Information about about terminal type and originating operator.
MMSContent An array of the actual content of the reply message.
type The content type of the message.
filename The filename for the message content.
payload The content of the message.
# Frequently Asked Questions **Q: Can I send a broadcast message using the Telstra Messging API?** A. Yes. Recipient numbers can be in teh form of an array of strings if a broadcast message needs to be sent.

Notes

View messaging in Swagger UI # noqa: E501 + # Introduction Send and receive SMS and MMS messages globally using Telstra’s enterprise grade Messaging API. It also allows your application to track the delivery status of both sent and received messages. Get your dedicated Australian number, and start sending and receiving messages today. # Features The Telstra Messaging API provides the features below. | Feature | Description | | --- | --- | | `Dedicated Number` | Provision a mobile number for your account to be used as `from` address in the API | | `Send Messages` | Sending SMS or MMS messages | | `Receive Messages` | Telstra will deliver messages sent to a dedicated number or to the `notifyURL` defined by you | | `Broadcast Messages` | Invoke a single API call to send a message to a list of numbers provided in `to` | | `Delivery Status` | Query the delivery status of your messages | | `Callbacks` | Provide a notification URL and Telstra will notify your app when a message status changes | | `Alphanumeric Identifier` | Differentiate yourself by providing an alphanumeric string in `from`. This feature is only available on paid plans | | `Concatenation` | Send messages up to 1900 characters long and Telstra will automaticaly segment and reassemble them | | `Reply Request` | Create a chat session by associating `messageId` and `to` number to track responses received from a mobile number. We will store this association for 8 days | | `Character set` | Accepts all Unicode characters as part of UTF-8 | | `Bounce-back response` | See if your SMS hits an unreachable or unallocated number (Australia Only) | | `Queuing` | Messaging API will automatically queue and deliver each message at a compliant rate. | | `Emoji Encoding` | The API supports the encoding of the full range of emojis. Emojis in the reply messages will be in their UTF-8 format. | ## Delivery Notification or Callbacks The API provides several methods for notifying when a message has been delivered to the destination. 1. When you send a message there is an opportunity to specify a `notifyURL`. Once the message has been delivered the API will make a call to this URL to advise of the message status. 2. If you do not specify a URL you can always call the `GET /status` API to get the status of the message. # Getting Access to the API 1. Register at [https://dev.telstra.com](https://dev.telstra.com). 2. After registration, login to [https://dev.telstra.com](https://dev.telstra.com) and navigate to the **My apps** page. 3. Create your application by clicking the **Add new app** button 4. Select **API Free Trial** Product when configuring your application. This Product includes the Telstra Messaging API as well as other free trial APIs. Your application will be approved automatically. 5. There is a maximum of 1000 free messages per developer. Additional messages and features can be purchased from [https://dev.telstra.com](https://dev.telstra.com). 6. Note your `Client key` and `Client secret` as these will be needed to provision a number for your application and for authentication. Now head over to **Getting Started** where you can find a postman collection as well as some links to sample apps and SDKs to get you started. Happy Messaging! # Frequently Asked Questions **Q: Is creating a subscription via the Provisioning call a required step?** A. Yes. You will only be able to start sending messages if you have a provisioned dedicated number. Use Provisioning to create a dedicated number subscription, or renew your dedicated number if it has expired. **Q: When trying to send an SMS I receive a `400 Bad Request` response. How can I fix this?** A. You need to make sure you have a provisioned dedicated number before you can send an SMS. If you do not have a provisioned dedicated number and you try to send a message via the API, you will get the error below in the response:
{   \"status\":\"400\",   \"code\":\"DELIVERY-IMPOSSIBLE\",   \"message\":\"Invalid \\'from\\' address specified\" }
Use Provisioning to create a dedicated number subscription, or renew your dedicated number if it has expired. **Q: Can I send a broadcast message using the Telstra Messaging API?** A. Yes. Recipient numbers can be in the form of an array of strings if a broadcast message needs to be sent, allowing you to send to multiple mobile numbers in one API call. A sample request body for this will be: `{\"to\":[\"+61412345678\",\"+61487654321\"],\"body\":\"Test Message\"}` **Q: Can I use `Alphanumeric Identifier` from my paid plan via credit card?** A. `Alphanumeric Identifier` is only available on Telstra Account paid plans, not through credit card paid plans. **Q: How long does my dedicated number stay active for?** A. When you provision a dedicated number, by default it will be active for 30-days. You can use the `activeDays` parameter during the provisioning call to increment or decrement the number of days your dedicated number will remain active. **Q: What is the maximum sized MMS that I can send?** A. This will depend on the carrier that will receive the MMS. For Telstra it's up to 2MB, Optus up to 1.5MB and Vodafone only allows up to 500kB. You will need to check with international carriers for thier MMS size limits. **Q: Are SMILs supported by the Messaging API?** A. While there will be no error if you send an MMS with a SMIL presentation, the actual layout or sequence defined in the SMIL may not display as expected because most of the new smartphone devices ignore the SMIL presentation layer. SMIL was used in feature phones which had limited capability and SMIL allowed a *powerpoint type* presentation to be provided. Smartphones now have the capability to display video which is the better option for presentations. It is recommended that MMS messages should just drop the SMIL. **Q: How do I assign a delivery notification or callback URL?** A. You can assign a delivery notification or callback URL by adding the `notifyURL` parameter in the body of the request when you send a message. Once the message has been delivered, a notification will then be posted to this callback URL. **Q: What is the difference between the `notifyURL` parameter in the Provisoning call versus the `notifyURL` parameter in the Send Message call?** A. The `notifyURL` in the Provisoning call will be the URL where replies to the provisioned number will be posted. On the other hand, the `notifyURL` in the Send Message call will be the URL where the delivery notification will be posted, e.g. when an SMS has already been delivered to the recipient. # Getting Started Below are the steps to get started with the Telstra Messaging API. 1. Generate an OAuth2 token using your `Client key` and `Client secret`. 2. Use the Provisioning call to create a subscription and receive a dedicated number. 3. Send a message to a specific mobile number. ## Run in Postman \"Run ## Sample Apps - [Perl Sample App](https://github.com/telstra/MessagingAPI-perl-sample-app) - [Happy Chat App](https://github.com/telstra/messaging-sample-code-happy-chat) - [PHP Sample App](https://github.com/developersteve/telstra-messaging-php) ## SDK Repos - [Messaging API - PHP SDK](https://github.com/telstra/MessagingAPI-SDK-php) - [Messaging API - Python SDK](https://github.com/telstra/MessagingAPI-SDK-python) - [Messaging API - Ruby SDK](https://github.com/telstra/MessagingAPI-SDK-ruby) - [Messaging API - NodeJS SDK](https://github.com/telstra/MessagingAPI-SDK-node) - [Messaging API - .Net2 SDK](https://github.com/telstra/MessagingAPI-SDK-dotnet) - [Messaging API - Java SDK](https://github.com/telstra/MessagingAPI-SDK-Java) ## Blog Posts For more information on the Messaging API, you can read these blog posts: - [Callbacks Part 1](https://dev.telstra.com/content/understanding-messaging-api-callbacks-part-1) - [Callbacks Part 2](https://dev.telstra.com/content/understanding-messaging-api-callbacks-part-2) # noqa: E501 OpenAPI spec version: 2.2.6 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,19 +17,20 @@ class OAuthResponse(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { 'access_token': 'str', 'token_type': 'str', 'expires_in': 'str' @@ -43,7 +43,7 @@ class OAuthResponse(object): } def __init__(self, access_token=None, token_type=None, expires_in=None): # noqa: E501 - """OAuthResponse - a model defined in Swagger""" # noqa: E501 + """OAuthResponse - a model defined in OpenAPI""" # noqa: E501 self._access_token = None self._token_type = None @@ -107,7 +107,7 @@ def token_type(self, token_type): def expires_in(self): """Gets the expires_in of this OAuthResponse. # noqa: E501 - OAuth expity time # noqa: E501 + OAuth expiry time # noqa: E501 :return: The expires_in of this OAuthResponse. # noqa: E501 :rtype: str @@ -118,7 +118,7 @@ def expires_in(self): def expires_in(self, expires_in): """Sets the expires_in of this OAuthResponse. - OAuth expity time # noqa: E501 + OAuth expiry time # noqa: E501 :param expires_in: The expires_in of this OAuthResponse. # noqa: E501 :type: str @@ -130,7 +130,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/Telstra_Messaging/models/outbound_poll_response.py b/Telstra_Messaging/models/outbound_poll_response.py index 4e5eaf5..bb99ef8 100644 --- a/Telstra_Messaging/models/outbound_poll_response.py +++ b/Telstra_Messaging/models/outbound_poll_response.py @@ -3,11 +3,10 @@ """ Telstra Messaging API - # Introduction Send and receive SMS and MMS messages globally using Telstra’s enterprise grade Messaging API. It also allows your application to track the delivery status of both sent and received messages. Get your dedicated Australian number, and start sending and receiving messages today. # Features

The Telstra Messaging API provides the features below.
Feature Description
Dedicated Number Provision a mobile number for your account to be used as from address in the API
Send Messages Sending SMS or MMS messages
Receive Messages Telstra will deliver messages sent to a dedicated number or to the notifyURL defined by you
Broadcast Messages Invoke a single API to send a message to a list of number provided in to
Delivery Status Query the delivery status of your messages
Callbacks Provide a notification URL and Telstra will notify your app when messages status changes
Alphanumeric Identifier Differentiate yourself by providing an alphanumeric string in from. This feature is only available on paid plans
Concatenation Send messages up to 1900 characters long and Telstra will automaticaly segment and reassemble them
Reply Request Create a chat session by associating messageId and to number to track responses received from a mobile number. We will store this association for 8 days
Character set Accepts all Unicode characters as part of UTF-8
Bounce-back response See if your SMS hits an unreachable or unallocated number (Australia Only)
Queuing Messaging API will automatically queue and deliver each message at a compliant rate.
Emoji Encoding The API supports the encoding of the full range of emojis. Emojis in the reply messages will be in their UTF-8 format.
# Getting Access to the API

  1. Register at https://dev.telstra.com.
  2. After registration, login to https://dev.telstra.com and navigate to the "My apps" page.
  3. Create your application by clicking the "Add new app" button
  4. Select "API Free Trial" Product when configuring your application. This Product includes the Telstra Messaging API as well as other APIs. Your application will be approved automatically.
  5. There is a maximum of 1000 free messages per developer. Additional messages and features can be purchased from https://dev.telstra.com.
  6. Note your Client key and Client secret as these will be needed to provision a number for your application and for authentication.

Now head over to Getting Started where you can find a postman collection as well as some links to sample apps and SDKs to get you started.

Happy Messaging! # Getting Started

Below are the steps to get started with the Telstra Messaging API.

  1. Generate OAuth2 Token using your Client key and Client secret.
  2. Create Subscription in order to receive a provisioned number.
  3. Send Message to a specific mobile number.

Run in Postman

\"Run

Sample Apps

- Perl Sample App - Happy Chat App - PHP Sample App

SDK repos

- Messaging API - PHP SDK - Messaging API - Python SDK - Messaging API - Ruby SDK - Messaging API - NodeJS SDK - Messaging API - .Net2 SDK - Messaging API - Java SDK # Delivery Notification The API provides several methods for notifying when a message has been delivered to the destination.
  1. When you provision a number there is an opportunity to specify a notifyURL, when the message has been delivered the API will make a call to this URL to advise of the message status. If this is not provided then you can make use the Get Replies API to poll for messages.
  2. If you do not specify a URL you can always call the GET /sms API get the latest replies to the message.
Please note that the notification URLs and the polling call are exclusive. If a notification URL has been set then the polling call will not provide any useful information.

Notification URL Format

When a message has reached its final state, the API will send a POST to the URL that has been previously specified.

Notification URL Format for SMS

{     to: '+61418123456'     sentTimestamp: '2017-03-17T10:05:22+10:00'     receivedTimestamp: '2017-03-17T10:05:23+10:00'     messageId: /cccb284200035236000000000ee9d074019e0301/1261418123456     deliveryStatus: DELIVRD   } 
\\ The fields are:
Field Description
to The number the message was sent to.
receivedTimestamp Time the message was sent to the API.
sentTimestamp Time handling of the message ended.
deliveryStatus The final state of the message.
messageId The same reference that was returned when the original message was sent.
receivedTimestamp Time the message was sent to the API.
Upon receiving this call it is expected that your servers will give a 204 (No Content) response. Anything else will cause the API to reattempt the call 5 minutes later.

Notification URL Format for SMS Replies

{     \"status\": \"RECEIVED\"     \"destinationAddress\": \"+61418123456\"     \"senderAddress\": \"+61421987654\"     \"message\": \"Foo\"             \"sentTimestamp\": \"2018-03-23T12:10:06+10:00\"   }                              
\\ The fields are:
Field Description
status The final state of the message.
destinationAddress The number the message was sent to.
senderAddress The number the message was sent from.
message The sontent of the SMS reply.
sentTimestamp Time handling of the message ended.

Notification URL Format for MMS Replies

{     \"status\": \"RECEIVED\",     \"destinationAddress\": \"+61418123456\",     \"senderAddress\": \"+61421987654\",     \"subject\": \"Foo\",     \"sentTimestamp\": \"2018-03-23T12:15:45+10:00\",     \"envelope\": \"string\",     \"MMSContent\":      [       {         \"type\": \"application/smil\",         \"filename\": \"smil.xml\",         \"payload\": \"string\"       },        {         \"type\": \"image/jpeg\",         \"filename\": \"sample.jpeg\",         \"payload\": \"string\"        }      ]    } 
\\ The fields are:
Field Description
status The final state of the message.
destinationAddress The number the message was sent to.
senderAddress The number the message was sent from.
subject The subject assigned to the message.
sentTimestamp Time handling of the message ended.
envelope Information about about terminal type and originating operator.
MMSContent An array of the actual content of the reply message.
type The content type of the message.
filename The filename for the message content.
payload The content of the message.
# Frequently Asked Questions **Q: Can I send a broadcast message using the Telstra Messging API?** A. Yes. Recipient numbers can be in teh form of an array of strings if a broadcast message needs to be sent.

Notes

View messaging in Swagger UI # noqa: E501 + # Introduction Send and receive SMS and MMS messages globally using Telstra’s enterprise grade Messaging API. It also allows your application to track the delivery status of both sent and received messages. Get your dedicated Australian number, and start sending and receiving messages today. # Features The Telstra Messaging API provides the features below. | Feature | Description | | --- | --- | | `Dedicated Number` | Provision a mobile number for your account to be used as `from` address in the API | | `Send Messages` | Sending SMS or MMS messages | | `Receive Messages` | Telstra will deliver messages sent to a dedicated number or to the `notifyURL` defined by you | | `Broadcast Messages` | Invoke a single API call to send a message to a list of numbers provided in `to` | | `Delivery Status` | Query the delivery status of your messages | | `Callbacks` | Provide a notification URL and Telstra will notify your app when a message status changes | | `Alphanumeric Identifier` | Differentiate yourself by providing an alphanumeric string in `from`. This feature is only available on paid plans | | `Concatenation` | Send messages up to 1900 characters long and Telstra will automaticaly segment and reassemble them | | `Reply Request` | Create a chat session by associating `messageId` and `to` number to track responses received from a mobile number. We will store this association for 8 days | | `Character set` | Accepts all Unicode characters as part of UTF-8 | | `Bounce-back response` | See if your SMS hits an unreachable or unallocated number (Australia Only) | | `Queuing` | Messaging API will automatically queue and deliver each message at a compliant rate. | | `Emoji Encoding` | The API supports the encoding of the full range of emojis. Emojis in the reply messages will be in their UTF-8 format. | ## Delivery Notification or Callbacks The API provides several methods for notifying when a message has been delivered to the destination. 1. When you send a message there is an opportunity to specify a `notifyURL`. Once the message has been delivered the API will make a call to this URL to advise of the message status. 2. If you do not specify a URL you can always call the `GET /status` API to get the status of the message. # Getting Access to the API 1. Register at [https://dev.telstra.com](https://dev.telstra.com). 2. After registration, login to [https://dev.telstra.com](https://dev.telstra.com) and navigate to the **My apps** page. 3. Create your application by clicking the **Add new app** button 4. Select **API Free Trial** Product when configuring your application. This Product includes the Telstra Messaging API as well as other free trial APIs. Your application will be approved automatically. 5. There is a maximum of 1000 free messages per developer. Additional messages and features can be purchased from [https://dev.telstra.com](https://dev.telstra.com). 6. Note your `Client key` and `Client secret` as these will be needed to provision a number for your application and for authentication. Now head over to **Getting Started** where you can find a postman collection as well as some links to sample apps and SDKs to get you started. Happy Messaging! # Frequently Asked Questions **Q: Is creating a subscription via the Provisioning call a required step?** A. Yes. You will only be able to start sending messages if you have a provisioned dedicated number. Use Provisioning to create a dedicated number subscription, or renew your dedicated number if it has expired. **Q: When trying to send an SMS I receive a `400 Bad Request` response. How can I fix this?** A. You need to make sure you have a provisioned dedicated number before you can send an SMS. If you do not have a provisioned dedicated number and you try to send a message via the API, you will get the error below in the response:
{   \"status\":\"400\",   \"code\":\"DELIVERY-IMPOSSIBLE\",   \"message\":\"Invalid \\'from\\' address specified\" }
Use Provisioning to create a dedicated number subscription, or renew your dedicated number if it has expired. **Q: Can I send a broadcast message using the Telstra Messaging API?** A. Yes. Recipient numbers can be in the form of an array of strings if a broadcast message needs to be sent, allowing you to send to multiple mobile numbers in one API call. A sample request body for this will be: `{\"to\":[\"+61412345678\",\"+61487654321\"],\"body\":\"Test Message\"}` **Q: Can I use `Alphanumeric Identifier` from my paid plan via credit card?** A. `Alphanumeric Identifier` is only available on Telstra Account paid plans, not through credit card paid plans. **Q: How long does my dedicated number stay active for?** A. When you provision a dedicated number, by default it will be active for 30-days. You can use the `activeDays` parameter during the provisioning call to increment or decrement the number of days your dedicated number will remain active. **Q: What is the maximum sized MMS that I can send?** A. This will depend on the carrier that will receive the MMS. For Telstra it's up to 2MB, Optus up to 1.5MB and Vodafone only allows up to 500kB. You will need to check with international carriers for thier MMS size limits. **Q: Are SMILs supported by the Messaging API?** A. While there will be no error if you send an MMS with a SMIL presentation, the actual layout or sequence defined in the SMIL may not display as expected because most of the new smartphone devices ignore the SMIL presentation layer. SMIL was used in feature phones which had limited capability and SMIL allowed a *powerpoint type* presentation to be provided. Smartphones now have the capability to display video which is the better option for presentations. It is recommended that MMS messages should just drop the SMIL. **Q: How do I assign a delivery notification or callback URL?** A. You can assign a delivery notification or callback URL by adding the `notifyURL` parameter in the body of the request when you send a message. Once the message has been delivered, a notification will then be posted to this callback URL. **Q: What is the difference between the `notifyURL` parameter in the Provisoning call versus the `notifyURL` parameter in the Send Message call?** A. The `notifyURL` in the Provisoning call will be the URL where replies to the provisioned number will be posted. On the other hand, the `notifyURL` in the Send Message call will be the URL where the delivery notification will be posted, e.g. when an SMS has already been delivered to the recipient. # Getting Started Below are the steps to get started with the Telstra Messaging API. 1. Generate an OAuth2 token using your `Client key` and `Client secret`. 2. Use the Provisioning call to create a subscription and receive a dedicated number. 3. Send a message to a specific mobile number. ## Run in Postman \"Run ## Sample Apps - [Perl Sample App](https://github.com/telstra/MessagingAPI-perl-sample-app) - [Happy Chat App](https://github.com/telstra/messaging-sample-code-happy-chat) - [PHP Sample App](https://github.com/developersteve/telstra-messaging-php) ## SDK Repos - [Messaging API - PHP SDK](https://github.com/telstra/MessagingAPI-SDK-php) - [Messaging API - Python SDK](https://github.com/telstra/MessagingAPI-SDK-python) - [Messaging API - Ruby SDK](https://github.com/telstra/MessagingAPI-SDK-ruby) - [Messaging API - NodeJS SDK](https://github.com/telstra/MessagingAPI-SDK-node) - [Messaging API - .Net2 SDK](https://github.com/telstra/MessagingAPI-SDK-dotnet) - [Messaging API - Java SDK](https://github.com/telstra/MessagingAPI-SDK-Java) ## Blog Posts For more information on the Messaging API, you can read these blog posts: - [Callbacks Part 1](https://dev.telstra.com/content/understanding-messaging-api-callbacks-part-1) - [Callbacks Part 2](https://dev.telstra.com/content/understanding-messaging-api-callbacks-part-2) # noqa: E501 OpenAPI spec version: 2.2.6 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -16,23 +15,22 @@ import six -from Telstra_Messaging.models.status import Status # noqa: F401,E501 - class OutboundPollResponse(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { 'to': 'str', 'sent_timestamp': 'str', 'received_timestamp': 'str', @@ -47,7 +45,7 @@ class OutboundPollResponse(object): } def __init__(self, to=None, sent_timestamp=None, received_timestamp=None, delivery_status=None): # noqa: E501 - """OutboundPollResponse - a model defined in Swagger""" # noqa: E501 + """OutboundPollResponse - a model defined in OpenAPI""" # noqa: E501 self._to = None self._sent_timestamp = None @@ -158,7 +156,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/Telstra_Messaging/models/provision_number_request.py b/Telstra_Messaging/models/provision_number_request.py index 097a1da..e29c501 100644 --- a/Telstra_Messaging/models/provision_number_request.py +++ b/Telstra_Messaging/models/provision_number_request.py @@ -3,11 +3,10 @@ """ Telstra Messaging API - # Introduction Send and receive SMS and MMS messages globally using Telstra’s enterprise grade Messaging API. It also allows your application to track the delivery status of both sent and received messages. Get your dedicated Australian number, and start sending and receiving messages today. # Features

The Telstra Messaging API provides the features below.
Feature Description
Dedicated Number Provision a mobile number for your account to be used as from address in the API
Send Messages Sending SMS or MMS messages
Receive Messages Telstra will deliver messages sent to a dedicated number or to the notifyURL defined by you
Broadcast Messages Invoke a single API to send a message to a list of number provided in to
Delivery Status Query the delivery status of your messages
Callbacks Provide a notification URL and Telstra will notify your app when messages status changes
Alphanumeric Identifier Differentiate yourself by providing an alphanumeric string in from. This feature is only available on paid plans
Concatenation Send messages up to 1900 characters long and Telstra will automaticaly segment and reassemble them
Reply Request Create a chat session by associating messageId and to number to track responses received from a mobile number. We will store this association for 8 days
Character set Accepts all Unicode characters as part of UTF-8
Bounce-back response See if your SMS hits an unreachable or unallocated number (Australia Only)
Queuing Messaging API will automatically queue and deliver each message at a compliant rate.
Emoji Encoding The API supports the encoding of the full range of emojis. Emojis in the reply messages will be in their UTF-8 format.
# Getting Access to the API

  1. Register at https://dev.telstra.com.
  2. After registration, login to https://dev.telstra.com and navigate to the "My apps" page.
  3. Create your application by clicking the "Add new app" button
  4. Select "API Free Trial" Product when configuring your application. This Product includes the Telstra Messaging API as well as other APIs. Your application will be approved automatically.
  5. There is a maximum of 1000 free messages per developer. Additional messages and features can be purchased from https://dev.telstra.com.
  6. Note your Client key and Client secret as these will be needed to provision a number for your application and for authentication.

Now head over to Getting Started where you can find a postman collection as well as some links to sample apps and SDKs to get you started.

Happy Messaging! # Getting Started

Below are the steps to get started with the Telstra Messaging API.

  1. Generate OAuth2 Token using your Client key and Client secret.
  2. Create Subscription in order to receive a provisioned number.
  3. Send Message to a specific mobile number.

Run in Postman

\"Run

Sample Apps

- Perl Sample App - Happy Chat App - PHP Sample App

SDK repos

- Messaging API - PHP SDK - Messaging API - Python SDK - Messaging API - Ruby SDK - Messaging API - NodeJS SDK - Messaging API - .Net2 SDK - Messaging API - Java SDK # Delivery Notification The API provides several methods for notifying when a message has been delivered to the destination.
  1. When you provision a number there is an opportunity to specify a notifyURL, when the message has been delivered the API will make a call to this URL to advise of the message status. If this is not provided then you can make use the Get Replies API to poll for messages.
  2. If you do not specify a URL you can always call the GET /sms API get the latest replies to the message.
Please note that the notification URLs and the polling call are exclusive. If a notification URL has been set then the polling call will not provide any useful information.

Notification URL Format

When a message has reached its final state, the API will send a POST to the URL that has been previously specified.

Notification URL Format for SMS

{     to: '+61418123456'     sentTimestamp: '2017-03-17T10:05:22+10:00'     receivedTimestamp: '2017-03-17T10:05:23+10:00'     messageId: /cccb284200035236000000000ee9d074019e0301/1261418123456     deliveryStatus: DELIVRD   } 
\\ The fields are:
Field Description
to The number the message was sent to.
receivedTimestamp Time the message was sent to the API.
sentTimestamp Time handling of the message ended.
deliveryStatus The final state of the message.
messageId The same reference that was returned when the original message was sent.
receivedTimestamp Time the message was sent to the API.
Upon receiving this call it is expected that your servers will give a 204 (No Content) response. Anything else will cause the API to reattempt the call 5 minutes later.

Notification URL Format for SMS Replies

{     \"status\": \"RECEIVED\"     \"destinationAddress\": \"+61418123456\"     \"senderAddress\": \"+61421987654\"     \"message\": \"Foo\"             \"sentTimestamp\": \"2018-03-23T12:10:06+10:00\"   }                              
\\ The fields are:
Field Description
status The final state of the message.
destinationAddress The number the message was sent to.
senderAddress The number the message was sent from.
message The sontent of the SMS reply.
sentTimestamp Time handling of the message ended.

Notification URL Format for MMS Replies

{     \"status\": \"RECEIVED\",     \"destinationAddress\": \"+61418123456\",     \"senderAddress\": \"+61421987654\",     \"subject\": \"Foo\",     \"sentTimestamp\": \"2018-03-23T12:15:45+10:00\",     \"envelope\": \"string\",     \"MMSContent\":      [       {         \"type\": \"application/smil\",         \"filename\": \"smil.xml\",         \"payload\": \"string\"       },        {         \"type\": \"image/jpeg\",         \"filename\": \"sample.jpeg\",         \"payload\": \"string\"        }      ]    } 
\\ The fields are:
Field Description
status The final state of the message.
destinationAddress The number the message was sent to.
senderAddress The number the message was sent from.
subject The subject assigned to the message.
sentTimestamp Time handling of the message ended.
envelope Information about about terminal type and originating operator.
MMSContent An array of the actual content of the reply message.
type The content type of the message.
filename The filename for the message content.
payload The content of the message.
# Frequently Asked Questions **Q: Can I send a broadcast message using the Telstra Messging API?** A. Yes. Recipient numbers can be in teh form of an array of strings if a broadcast message needs to be sent.

Notes

View messaging in Swagger UI # noqa: E501 + # Introduction Send and receive SMS and MMS messages globally using Telstra’s enterprise grade Messaging API. It also allows your application to track the delivery status of both sent and received messages. Get your dedicated Australian number, and start sending and receiving messages today. # Features The Telstra Messaging API provides the features below. | Feature | Description | | --- | --- | | `Dedicated Number` | Provision a mobile number for your account to be used as `from` address in the API | | `Send Messages` | Sending SMS or MMS messages | | `Receive Messages` | Telstra will deliver messages sent to a dedicated number or to the `notifyURL` defined by you | | `Broadcast Messages` | Invoke a single API call to send a message to a list of numbers provided in `to` | | `Delivery Status` | Query the delivery status of your messages | | `Callbacks` | Provide a notification URL and Telstra will notify your app when a message status changes | | `Alphanumeric Identifier` | Differentiate yourself by providing an alphanumeric string in `from`. This feature is only available on paid plans | | `Concatenation` | Send messages up to 1900 characters long and Telstra will automaticaly segment and reassemble them | | `Reply Request` | Create a chat session by associating `messageId` and `to` number to track responses received from a mobile number. We will store this association for 8 days | | `Character set` | Accepts all Unicode characters as part of UTF-8 | | `Bounce-back response` | See if your SMS hits an unreachable or unallocated number (Australia Only) | | `Queuing` | Messaging API will automatically queue and deliver each message at a compliant rate. | | `Emoji Encoding` | The API supports the encoding of the full range of emojis. Emojis in the reply messages will be in their UTF-8 format. | ## Delivery Notification or Callbacks The API provides several methods for notifying when a message has been delivered to the destination. 1. When you send a message there is an opportunity to specify a `notifyURL`. Once the message has been delivered the API will make a call to this URL to advise of the message status. 2. If you do not specify a URL you can always call the `GET /status` API to get the status of the message. # Getting Access to the API 1. Register at [https://dev.telstra.com](https://dev.telstra.com). 2. After registration, login to [https://dev.telstra.com](https://dev.telstra.com) and navigate to the **My apps** page. 3. Create your application by clicking the **Add new app** button 4. Select **API Free Trial** Product when configuring your application. This Product includes the Telstra Messaging API as well as other free trial APIs. Your application will be approved automatically. 5. There is a maximum of 1000 free messages per developer. Additional messages and features can be purchased from [https://dev.telstra.com](https://dev.telstra.com). 6. Note your `Client key` and `Client secret` as these will be needed to provision a number for your application and for authentication. Now head over to **Getting Started** where you can find a postman collection as well as some links to sample apps and SDKs to get you started. Happy Messaging! # Frequently Asked Questions **Q: Is creating a subscription via the Provisioning call a required step?** A. Yes. You will only be able to start sending messages if you have a provisioned dedicated number. Use Provisioning to create a dedicated number subscription, or renew your dedicated number if it has expired. **Q: When trying to send an SMS I receive a `400 Bad Request` response. How can I fix this?** A. You need to make sure you have a provisioned dedicated number before you can send an SMS. If you do not have a provisioned dedicated number and you try to send a message via the API, you will get the error below in the response:
{   \"status\":\"400\",   \"code\":\"DELIVERY-IMPOSSIBLE\",   \"message\":\"Invalid \\'from\\' address specified\" }
Use Provisioning to create a dedicated number subscription, or renew your dedicated number if it has expired. **Q: Can I send a broadcast message using the Telstra Messaging API?** A. Yes. Recipient numbers can be in the form of an array of strings if a broadcast message needs to be sent, allowing you to send to multiple mobile numbers in one API call. A sample request body for this will be: `{\"to\":[\"+61412345678\",\"+61487654321\"],\"body\":\"Test Message\"}` **Q: Can I use `Alphanumeric Identifier` from my paid plan via credit card?** A. `Alphanumeric Identifier` is only available on Telstra Account paid plans, not through credit card paid plans. **Q: How long does my dedicated number stay active for?** A. When you provision a dedicated number, by default it will be active for 30-days. You can use the `activeDays` parameter during the provisioning call to increment or decrement the number of days your dedicated number will remain active. **Q: What is the maximum sized MMS that I can send?** A. This will depend on the carrier that will receive the MMS. For Telstra it's up to 2MB, Optus up to 1.5MB and Vodafone only allows up to 500kB. You will need to check with international carriers for thier MMS size limits. **Q: Are SMILs supported by the Messaging API?** A. While there will be no error if you send an MMS with a SMIL presentation, the actual layout or sequence defined in the SMIL may not display as expected because most of the new smartphone devices ignore the SMIL presentation layer. SMIL was used in feature phones which had limited capability and SMIL allowed a *powerpoint type* presentation to be provided. Smartphones now have the capability to display video which is the better option for presentations. It is recommended that MMS messages should just drop the SMIL. **Q: How do I assign a delivery notification or callback URL?** A. You can assign a delivery notification or callback URL by adding the `notifyURL` parameter in the body of the request when you send a message. Once the message has been delivered, a notification will then be posted to this callback URL. **Q: What is the difference between the `notifyURL` parameter in the Provisoning call versus the `notifyURL` parameter in the Send Message call?** A. The `notifyURL` in the Provisoning call will be the URL where replies to the provisioned number will be posted. On the other hand, the `notifyURL` in the Send Message call will be the URL where the delivery notification will be posted, e.g. when an SMS has already been delivered to the recipient. # Getting Started Below are the steps to get started with the Telstra Messaging API. 1. Generate an OAuth2 token using your `Client key` and `Client secret`. 2. Use the Provisioning call to create a subscription and receive a dedicated number. 3. Send a message to a specific mobile number. ## Run in Postman \"Run ## Sample Apps - [Perl Sample App](https://github.com/telstra/MessagingAPI-perl-sample-app) - [Happy Chat App](https://github.com/telstra/messaging-sample-code-happy-chat) - [PHP Sample App](https://github.com/developersteve/telstra-messaging-php) ## SDK Repos - [Messaging API - PHP SDK](https://github.com/telstra/MessagingAPI-SDK-php) - [Messaging API - Python SDK](https://github.com/telstra/MessagingAPI-SDK-python) - [Messaging API - Ruby SDK](https://github.com/telstra/MessagingAPI-SDK-ruby) - [Messaging API - NodeJS SDK](https://github.com/telstra/MessagingAPI-SDK-node) - [Messaging API - .Net2 SDK](https://github.com/telstra/MessagingAPI-SDK-dotnet) - [Messaging API - Java SDK](https://github.com/telstra/MessagingAPI-SDK-Java) ## Blog Posts For more information on the Messaging API, you can read these blog posts: - [Callbacks Part 1](https://dev.telstra.com/content/understanding-messaging-api-callbacks-part-1) - [Callbacks Part 2](https://dev.telstra.com/content/understanding-messaging-api-callbacks-part-2) # noqa: E501 OpenAPI spec version: 2.2.6 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,19 +17,20 @@ class ProvisionNumberRequest(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { 'active_days': 'int', 'notify_url': 'str', 'callback_data': 'str' @@ -43,7 +43,7 @@ class ProvisionNumberRequest(object): } def __init__(self, active_days=None, notify_url=None, callback_data=None): # noqa: E501 - """ProvisionNumberRequest - a model defined in Swagger""" # noqa: E501 + """ProvisionNumberRequest - a model defined in OpenAPI""" # noqa: E501 self._active_days = None self._notify_url = None @@ -61,7 +61,7 @@ def __init__(self, active_days=None, notify_url=None, callback_data=None): # no def active_days(self): """Gets the active_days of this ProvisionNumberRequest. # noqa: E501 - The number of days before for which this number is provisioned. Usually this will be same as the plan you buy. # noqa: E501 + The number of days before for which this number is provisioned. Usually this will be same as the plan you buy. # noqa: E501 :return: The active_days of this ProvisionNumberRequest. # noqa: E501 :rtype: int @@ -72,7 +72,7 @@ def active_days(self): def active_days(self, active_days): """Sets the active_days of this ProvisionNumberRequest. - The number of days before for which this number is provisioned. Usually this will be same as the plan you buy. # noqa: E501 + The number of days before for which this number is provisioned. Usually this will be same as the plan you buy. # noqa: E501 :param active_days: The active_days of this ProvisionNumberRequest. # noqa: E501 :type: int @@ -84,7 +84,7 @@ def active_days(self, active_days): def notify_url(self): """Gets the notify_url of this ProvisionNumberRequest. # noqa: E501 - A callback URL that will be POSTed to whenever a new message arrives at this destination address. If this is not provided then you can make use the Get Replies API to poll for messages. # noqa: E501 + A notification URL that will be POSTed to whenever a new message (e.g. a reply to a message sent) arrives at this destination address. If this is not provided then you can use the Get /sms or /mms API to poll for reply messages. *Please note that the notification URLs and the Get /sms or /mms call are exclusive. If a notification URL has been set then the GET call will not provide any useful information.* # noqa: E501 :return: The notify_url of this ProvisionNumberRequest. # noqa: E501 :rtype: str @@ -95,7 +95,7 @@ def notify_url(self): def notify_url(self, notify_url): """Sets the notify_url of this ProvisionNumberRequest. - A callback URL that will be POSTed to whenever a new message arrives at this destination address. If this is not provided then you can make use the Get Replies API to poll for messages. # noqa: E501 + A notification URL that will be POSTed to whenever a new message (e.g. a reply to a message sent) arrives at this destination address. If this is not provided then you can use the Get /sms or /mms API to poll for reply messages. *Please note that the notification URLs and the Get /sms or /mms call are exclusive. If a notification URL has been set then the GET call will not provide any useful information.* # noqa: E501 :param notify_url: The notify_url of this ProvisionNumberRequest. # noqa: E501 :type: str @@ -107,7 +107,7 @@ def notify_url(self, notify_url): def callback_data(self): """Gets the callback_data of this ProvisionNumberRequest. # noqa: E501 - A JSON that will be sent as the body in the POST to the notifyURL. This can be any meaningful data relevant to your application. # noqa: E501 + A JSON that will be sent as the body in the POST to the notifyURL. This can be any meaningful data relevant to your application. # noqa: E501 :return: The callback_data of this ProvisionNumberRequest. # noqa: E501 :rtype: str @@ -118,7 +118,7 @@ def callback_data(self): def callback_data(self, callback_data): """Sets the callback_data of this ProvisionNumberRequest. - A JSON that will be sent as the body in the POST to the notifyURL. This can be any meaningful data relevant to your application. # noqa: E501 + A JSON that will be sent as the body in the POST to the notifyURL. This can be any meaningful data relevant to your application. # noqa: E501 :param callback_data: The callback_data of this ProvisionNumberRequest. # noqa: E501 :type: str @@ -130,7 +130,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/Telstra_Messaging/models/provision_number_response.py b/Telstra_Messaging/models/provision_number_response.py index 5684b53..efd2e9c 100644 --- a/Telstra_Messaging/models/provision_number_response.py +++ b/Telstra_Messaging/models/provision_number_response.py @@ -3,11 +3,10 @@ """ Telstra Messaging API - # Introduction Send and receive SMS and MMS messages globally using Telstra’s enterprise grade Messaging API. It also allows your application to track the delivery status of both sent and received messages. Get your dedicated Australian number, and start sending and receiving messages today. # Features

The Telstra Messaging API provides the features below.
Feature Description
Dedicated Number Provision a mobile number for your account to be used as from address in the API
Send Messages Sending SMS or MMS messages
Receive Messages Telstra will deliver messages sent to a dedicated number or to the notifyURL defined by you
Broadcast Messages Invoke a single API to send a message to a list of number provided in to
Delivery Status Query the delivery status of your messages
Callbacks Provide a notification URL and Telstra will notify your app when messages status changes
Alphanumeric Identifier Differentiate yourself by providing an alphanumeric string in from. This feature is only available on paid plans
Concatenation Send messages up to 1900 characters long and Telstra will automaticaly segment and reassemble them
Reply Request Create a chat session by associating messageId and to number to track responses received from a mobile number. We will store this association for 8 days
Character set Accepts all Unicode characters as part of UTF-8
Bounce-back response See if your SMS hits an unreachable or unallocated number (Australia Only)
Queuing Messaging API will automatically queue and deliver each message at a compliant rate.
Emoji Encoding The API supports the encoding of the full range of emojis. Emojis in the reply messages will be in their UTF-8 format.
# Getting Access to the API

  1. Register at https://dev.telstra.com.
  2. After registration, login to https://dev.telstra.com and navigate to the "My apps" page.
  3. Create your application by clicking the "Add new app" button
  4. Select "API Free Trial" Product when configuring your application. This Product includes the Telstra Messaging API as well as other APIs. Your application will be approved automatically.
  5. There is a maximum of 1000 free messages per developer. Additional messages and features can be purchased from https://dev.telstra.com.
  6. Note your Client key and Client secret as these will be needed to provision a number for your application and for authentication.

Now head over to Getting Started where you can find a postman collection as well as some links to sample apps and SDKs to get you started.

Happy Messaging! # Getting Started

Below are the steps to get started with the Telstra Messaging API.

  1. Generate OAuth2 Token using your Client key and Client secret.
  2. Create Subscription in order to receive a provisioned number.
  3. Send Message to a specific mobile number.

Run in Postman

\"Run

Sample Apps

- Perl Sample App - Happy Chat App - PHP Sample App

SDK repos

- Messaging API - PHP SDK - Messaging API - Python SDK - Messaging API - Ruby SDK - Messaging API - NodeJS SDK - Messaging API - .Net2 SDK - Messaging API - Java SDK # Delivery Notification The API provides several methods for notifying when a message has been delivered to the destination.
  1. When you provision a number there is an opportunity to specify a notifyURL, when the message has been delivered the API will make a call to this URL to advise of the message status. If this is not provided then you can make use the Get Replies API to poll for messages.
  2. If you do not specify a URL you can always call the GET /sms API get the latest replies to the message.
Please note that the notification URLs and the polling call are exclusive. If a notification URL has been set then the polling call will not provide any useful information.

Notification URL Format

When a message has reached its final state, the API will send a POST to the URL that has been previously specified.

Notification URL Format for SMS

{     to: '+61418123456'     sentTimestamp: '2017-03-17T10:05:22+10:00'     receivedTimestamp: '2017-03-17T10:05:23+10:00'     messageId: /cccb284200035236000000000ee9d074019e0301/1261418123456     deliveryStatus: DELIVRD   } 
\\ The fields are:
Field Description
to The number the message was sent to.
receivedTimestamp Time the message was sent to the API.
sentTimestamp Time handling of the message ended.
deliveryStatus The final state of the message.
messageId The same reference that was returned when the original message was sent.
receivedTimestamp Time the message was sent to the API.
Upon receiving this call it is expected that your servers will give a 204 (No Content) response. Anything else will cause the API to reattempt the call 5 minutes later.

Notification URL Format for SMS Replies

{     \"status\": \"RECEIVED\"     \"destinationAddress\": \"+61418123456\"     \"senderAddress\": \"+61421987654\"     \"message\": \"Foo\"             \"sentTimestamp\": \"2018-03-23T12:10:06+10:00\"   }                              
\\ The fields are:
Field Description
status The final state of the message.
destinationAddress The number the message was sent to.
senderAddress The number the message was sent from.
message The sontent of the SMS reply.
sentTimestamp Time handling of the message ended.

Notification URL Format for MMS Replies

{     \"status\": \"RECEIVED\",     \"destinationAddress\": \"+61418123456\",     \"senderAddress\": \"+61421987654\",     \"subject\": \"Foo\",     \"sentTimestamp\": \"2018-03-23T12:15:45+10:00\",     \"envelope\": \"string\",     \"MMSContent\":      [       {         \"type\": \"application/smil\",         \"filename\": \"smil.xml\",         \"payload\": \"string\"       },        {         \"type\": \"image/jpeg\",         \"filename\": \"sample.jpeg\",         \"payload\": \"string\"        }      ]    } 
\\ The fields are:
Field Description
status The final state of the message.
destinationAddress The number the message was sent to.
senderAddress The number the message was sent from.
subject The subject assigned to the message.
sentTimestamp Time handling of the message ended.
envelope Information about about terminal type and originating operator.
MMSContent An array of the actual content of the reply message.
type The content type of the message.
filename The filename for the message content.
payload The content of the message.
# Frequently Asked Questions **Q: Can I send a broadcast message using the Telstra Messging API?** A. Yes. Recipient numbers can be in teh form of an array of strings if a broadcast message needs to be sent.

Notes

View messaging in Swagger UI # noqa: E501 + # Introduction Send and receive SMS and MMS messages globally using Telstra’s enterprise grade Messaging API. It also allows your application to track the delivery status of both sent and received messages. Get your dedicated Australian number, and start sending and receiving messages today. # Features The Telstra Messaging API provides the features below. | Feature | Description | | --- | --- | | `Dedicated Number` | Provision a mobile number for your account to be used as `from` address in the API | | `Send Messages` | Sending SMS or MMS messages | | `Receive Messages` | Telstra will deliver messages sent to a dedicated number or to the `notifyURL` defined by you | | `Broadcast Messages` | Invoke a single API call to send a message to a list of numbers provided in `to` | | `Delivery Status` | Query the delivery status of your messages | | `Callbacks` | Provide a notification URL and Telstra will notify your app when a message status changes | | `Alphanumeric Identifier` | Differentiate yourself by providing an alphanumeric string in `from`. This feature is only available on paid plans | | `Concatenation` | Send messages up to 1900 characters long and Telstra will automaticaly segment and reassemble them | | `Reply Request` | Create a chat session by associating `messageId` and `to` number to track responses received from a mobile number. We will store this association for 8 days | | `Character set` | Accepts all Unicode characters as part of UTF-8 | | `Bounce-back response` | See if your SMS hits an unreachable or unallocated number (Australia Only) | | `Queuing` | Messaging API will automatically queue and deliver each message at a compliant rate. | | `Emoji Encoding` | The API supports the encoding of the full range of emojis. Emojis in the reply messages will be in their UTF-8 format. | ## Delivery Notification or Callbacks The API provides several methods for notifying when a message has been delivered to the destination. 1. When you send a message there is an opportunity to specify a `notifyURL`. Once the message has been delivered the API will make a call to this URL to advise of the message status. 2. If you do not specify a URL you can always call the `GET /status` API to get the status of the message. # Getting Access to the API 1. Register at [https://dev.telstra.com](https://dev.telstra.com). 2. After registration, login to [https://dev.telstra.com](https://dev.telstra.com) and navigate to the **My apps** page. 3. Create your application by clicking the **Add new app** button 4. Select **API Free Trial** Product when configuring your application. This Product includes the Telstra Messaging API as well as other free trial APIs. Your application will be approved automatically. 5. There is a maximum of 1000 free messages per developer. Additional messages and features can be purchased from [https://dev.telstra.com](https://dev.telstra.com). 6. Note your `Client key` and `Client secret` as these will be needed to provision a number for your application and for authentication. Now head over to **Getting Started** where you can find a postman collection as well as some links to sample apps and SDKs to get you started. Happy Messaging! # Frequently Asked Questions **Q: Is creating a subscription via the Provisioning call a required step?** A. Yes. You will only be able to start sending messages if you have a provisioned dedicated number. Use Provisioning to create a dedicated number subscription, or renew your dedicated number if it has expired. **Q: When trying to send an SMS I receive a `400 Bad Request` response. How can I fix this?** A. You need to make sure you have a provisioned dedicated number before you can send an SMS. If you do not have a provisioned dedicated number and you try to send a message via the API, you will get the error below in the response:
{   \"status\":\"400\",   \"code\":\"DELIVERY-IMPOSSIBLE\",   \"message\":\"Invalid \\'from\\' address specified\" }
Use Provisioning to create a dedicated number subscription, or renew your dedicated number if it has expired. **Q: Can I send a broadcast message using the Telstra Messaging API?** A. Yes. Recipient numbers can be in the form of an array of strings if a broadcast message needs to be sent, allowing you to send to multiple mobile numbers in one API call. A sample request body for this will be: `{\"to\":[\"+61412345678\",\"+61487654321\"],\"body\":\"Test Message\"}` **Q: Can I use `Alphanumeric Identifier` from my paid plan via credit card?** A. `Alphanumeric Identifier` is only available on Telstra Account paid plans, not through credit card paid plans. **Q: How long does my dedicated number stay active for?** A. When you provision a dedicated number, by default it will be active for 30-days. You can use the `activeDays` parameter during the provisioning call to increment or decrement the number of days your dedicated number will remain active. **Q: What is the maximum sized MMS that I can send?** A. This will depend on the carrier that will receive the MMS. For Telstra it's up to 2MB, Optus up to 1.5MB and Vodafone only allows up to 500kB. You will need to check with international carriers for thier MMS size limits. **Q: Are SMILs supported by the Messaging API?** A. While there will be no error if you send an MMS with a SMIL presentation, the actual layout or sequence defined in the SMIL may not display as expected because most of the new smartphone devices ignore the SMIL presentation layer. SMIL was used in feature phones which had limited capability and SMIL allowed a *powerpoint type* presentation to be provided. Smartphones now have the capability to display video which is the better option for presentations. It is recommended that MMS messages should just drop the SMIL. **Q: How do I assign a delivery notification or callback URL?** A. You can assign a delivery notification or callback URL by adding the `notifyURL` parameter in the body of the request when you send a message. Once the message has been delivered, a notification will then be posted to this callback URL. **Q: What is the difference between the `notifyURL` parameter in the Provisoning call versus the `notifyURL` parameter in the Send Message call?** A. The `notifyURL` in the Provisoning call will be the URL where replies to the provisioned number will be posted. On the other hand, the `notifyURL` in the Send Message call will be the URL where the delivery notification will be posted, e.g. when an SMS has already been delivered to the recipient. # Getting Started Below are the steps to get started with the Telstra Messaging API. 1. Generate an OAuth2 token using your `Client key` and `Client secret`. 2. Use the Provisioning call to create a subscription and receive a dedicated number. 3. Send a message to a specific mobile number. ## Run in Postman \"Run ## Sample Apps - [Perl Sample App](https://github.com/telstra/MessagingAPI-perl-sample-app) - [Happy Chat App](https://github.com/telstra/messaging-sample-code-happy-chat) - [PHP Sample App](https://github.com/developersteve/telstra-messaging-php) ## SDK Repos - [Messaging API - PHP SDK](https://github.com/telstra/MessagingAPI-SDK-php) - [Messaging API - Python SDK](https://github.com/telstra/MessagingAPI-SDK-python) - [Messaging API - Ruby SDK](https://github.com/telstra/MessagingAPI-SDK-ruby) - [Messaging API - NodeJS SDK](https://github.com/telstra/MessagingAPI-SDK-node) - [Messaging API - .Net2 SDK](https://github.com/telstra/MessagingAPI-SDK-dotnet) - [Messaging API - Java SDK](https://github.com/telstra/MessagingAPI-SDK-Java) ## Blog Posts For more information on the Messaging API, you can read these blog posts: - [Callbacks Part 1](https://dev.telstra.com/content/understanding-messaging-api-callbacks-part-1) - [Callbacks Part 2](https://dev.telstra.com/content/understanding-messaging-api-callbacks-part-2) # noqa: E501 OpenAPI spec version: 2.2.6 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,19 +17,20 @@ class ProvisionNumberResponse(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { 'destination_address': 'str' } @@ -39,7 +39,7 @@ class ProvisionNumberResponse(object): } def __init__(self, destination_address=None): # noqa: E501 - """ProvisionNumberResponse - a model defined in Swagger""" # noqa: E501 + """ProvisionNumberResponse - a model defined in OpenAPI""" # noqa: E501 self._destination_address = None self.discriminator = None @@ -74,7 +74,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/Telstra_Messaging/models/send_mms_request.py b/Telstra_Messaging/models/send_mms_request.py index b090462..4e9957e 100644 --- a/Telstra_Messaging/models/send_mms_request.py +++ b/Telstra_Messaging/models/send_mms_request.py @@ -3,11 +3,10 @@ """ Telstra Messaging API - # Introduction Send and receive SMS and MMS messages globally using Telstra’s enterprise grade Messaging API. It also allows your application to track the delivery status of both sent and received messages. Get your dedicated Australian number, and start sending and receiving messages today. # Features

The Telstra Messaging API provides the features below.
Feature Description
Dedicated Number Provision a mobile number for your account to be used as from address in the API
Send Messages Sending SMS or MMS messages
Receive Messages Telstra will deliver messages sent to a dedicated number or to the notifyURL defined by you
Broadcast Messages Invoke a single API to send a message to a list of number provided in to
Delivery Status Query the delivery status of your messages
Callbacks Provide a notification URL and Telstra will notify your app when messages status changes
Alphanumeric Identifier Differentiate yourself by providing an alphanumeric string in from. This feature is only available on paid plans
Concatenation Send messages up to 1900 characters long and Telstra will automaticaly segment and reassemble them
Reply Request Create a chat session by associating messageId and to number to track responses received from a mobile number. We will store this association for 8 days
Character set Accepts all Unicode characters as part of UTF-8
Bounce-back response See if your SMS hits an unreachable or unallocated number (Australia Only)
Queuing Messaging API will automatically queue and deliver each message at a compliant rate.
Emoji Encoding The API supports the encoding of the full range of emojis. Emojis in the reply messages will be in their UTF-8 format.
# Getting Access to the API

  1. Register at https://dev.telstra.com.
  2. After registration, login to https://dev.telstra.com and navigate to the "My apps" page.
  3. Create your application by clicking the "Add new app" button
  4. Select "API Free Trial" Product when configuring your application. This Product includes the Telstra Messaging API as well as other APIs. Your application will be approved automatically.
  5. There is a maximum of 1000 free messages per developer. Additional messages and features can be purchased from https://dev.telstra.com.
  6. Note your Client key and Client secret as these will be needed to provision a number for your application and for authentication.

Now head over to Getting Started where you can find a postman collection as well as some links to sample apps and SDKs to get you started.

Happy Messaging! # Getting Started

Below are the steps to get started with the Telstra Messaging API.

  1. Generate OAuth2 Token using your Client key and Client secret.
  2. Create Subscription in order to receive a provisioned number.
  3. Send Message to a specific mobile number.

Run in Postman

\"Run

Sample Apps

- Perl Sample App - Happy Chat App - PHP Sample App

SDK repos

- Messaging API - PHP SDK - Messaging API - Python SDK - Messaging API - Ruby SDK - Messaging API - NodeJS SDK - Messaging API - .Net2 SDK - Messaging API - Java SDK # Delivery Notification The API provides several methods for notifying when a message has been delivered to the destination.
  1. When you provision a number there is an opportunity to specify a notifyURL, when the message has been delivered the API will make a call to this URL to advise of the message status. If this is not provided then you can make use the Get Replies API to poll for messages.
  2. If you do not specify a URL you can always call the GET /sms API get the latest replies to the message.
Please note that the notification URLs and the polling call are exclusive. If a notification URL has been set then the polling call will not provide any useful information.

Notification URL Format

When a message has reached its final state, the API will send a POST to the URL that has been previously specified.

Notification URL Format for SMS

{     to: '+61418123456'     sentTimestamp: '2017-03-17T10:05:22+10:00'     receivedTimestamp: '2017-03-17T10:05:23+10:00'     messageId: /cccb284200035236000000000ee9d074019e0301/1261418123456     deliveryStatus: DELIVRD   } 
\\ The fields are:
Field Description
to The number the message was sent to.
receivedTimestamp Time the message was sent to the API.
sentTimestamp Time handling of the message ended.
deliveryStatus The final state of the message.
messageId The same reference that was returned when the original message was sent.
receivedTimestamp Time the message was sent to the API.
Upon receiving this call it is expected that your servers will give a 204 (No Content) response. Anything else will cause the API to reattempt the call 5 minutes later.

Notification URL Format for SMS Replies

{     \"status\": \"RECEIVED\"     \"destinationAddress\": \"+61418123456\"     \"senderAddress\": \"+61421987654\"     \"message\": \"Foo\"             \"sentTimestamp\": \"2018-03-23T12:10:06+10:00\"   }                              
\\ The fields are:
Field Description
status The final state of the message.
destinationAddress The number the message was sent to.
senderAddress The number the message was sent from.
message The sontent of the SMS reply.
sentTimestamp Time handling of the message ended.

Notification URL Format for MMS Replies

{     \"status\": \"RECEIVED\",     \"destinationAddress\": \"+61418123456\",     \"senderAddress\": \"+61421987654\",     \"subject\": \"Foo\",     \"sentTimestamp\": \"2018-03-23T12:15:45+10:00\",     \"envelope\": \"string\",     \"MMSContent\":      [       {         \"type\": \"application/smil\",         \"filename\": \"smil.xml\",         \"payload\": \"string\"       },        {         \"type\": \"image/jpeg\",         \"filename\": \"sample.jpeg\",         \"payload\": \"string\"        }      ]    } 
\\ The fields are:
Field Description
status The final state of the message.
destinationAddress The number the message was sent to.
senderAddress The number the message was sent from.
subject The subject assigned to the message.
sentTimestamp Time handling of the message ended.
envelope Information about about terminal type and originating operator.
MMSContent An array of the actual content of the reply message.
type The content type of the message.
filename The filename for the message content.
payload The content of the message.
# Frequently Asked Questions **Q: Can I send a broadcast message using the Telstra Messging API?** A. Yes. Recipient numbers can be in teh form of an array of strings if a broadcast message needs to be sent.

Notes

View messaging in Swagger UI # noqa: E501 + # Introduction Send and receive SMS and MMS messages globally using Telstra’s enterprise grade Messaging API. It also allows your application to track the delivery status of both sent and received messages. Get your dedicated Australian number, and start sending and receiving messages today. # Features The Telstra Messaging API provides the features below. | Feature | Description | | --- | --- | | `Dedicated Number` | Provision a mobile number for your account to be used as `from` address in the API | | `Send Messages` | Sending SMS or MMS messages | | `Receive Messages` | Telstra will deliver messages sent to a dedicated number or to the `notifyURL` defined by you | | `Broadcast Messages` | Invoke a single API call to send a message to a list of numbers provided in `to` | | `Delivery Status` | Query the delivery status of your messages | | `Callbacks` | Provide a notification URL and Telstra will notify your app when a message status changes | | `Alphanumeric Identifier` | Differentiate yourself by providing an alphanumeric string in `from`. This feature is only available on paid plans | | `Concatenation` | Send messages up to 1900 characters long and Telstra will automaticaly segment and reassemble them | | `Reply Request` | Create a chat session by associating `messageId` and `to` number to track responses received from a mobile number. We will store this association for 8 days | | `Character set` | Accepts all Unicode characters as part of UTF-8 | | `Bounce-back response` | See if your SMS hits an unreachable or unallocated number (Australia Only) | | `Queuing` | Messaging API will automatically queue and deliver each message at a compliant rate. | | `Emoji Encoding` | The API supports the encoding of the full range of emojis. Emojis in the reply messages will be in their UTF-8 format. | ## Delivery Notification or Callbacks The API provides several methods for notifying when a message has been delivered to the destination. 1. When you send a message there is an opportunity to specify a `notifyURL`. Once the message has been delivered the API will make a call to this URL to advise of the message status. 2. If you do not specify a URL you can always call the `GET /status` API to get the status of the message. # Getting Access to the API 1. Register at [https://dev.telstra.com](https://dev.telstra.com). 2. After registration, login to [https://dev.telstra.com](https://dev.telstra.com) and navigate to the **My apps** page. 3. Create your application by clicking the **Add new app** button 4. Select **API Free Trial** Product when configuring your application. This Product includes the Telstra Messaging API as well as other free trial APIs. Your application will be approved automatically. 5. There is a maximum of 1000 free messages per developer. Additional messages and features can be purchased from [https://dev.telstra.com](https://dev.telstra.com). 6. Note your `Client key` and `Client secret` as these will be needed to provision a number for your application and for authentication. Now head over to **Getting Started** where you can find a postman collection as well as some links to sample apps and SDKs to get you started. Happy Messaging! # Frequently Asked Questions **Q: Is creating a subscription via the Provisioning call a required step?** A. Yes. You will only be able to start sending messages if you have a provisioned dedicated number. Use Provisioning to create a dedicated number subscription, or renew your dedicated number if it has expired. **Q: When trying to send an SMS I receive a `400 Bad Request` response. How can I fix this?** A. You need to make sure you have a provisioned dedicated number before you can send an SMS. If you do not have a provisioned dedicated number and you try to send a message via the API, you will get the error below in the response:
{   \"status\":\"400\",   \"code\":\"DELIVERY-IMPOSSIBLE\",   \"message\":\"Invalid \\'from\\' address specified\" }
Use Provisioning to create a dedicated number subscription, or renew your dedicated number if it has expired. **Q: Can I send a broadcast message using the Telstra Messaging API?** A. Yes. Recipient numbers can be in the form of an array of strings if a broadcast message needs to be sent, allowing you to send to multiple mobile numbers in one API call. A sample request body for this will be: `{\"to\":[\"+61412345678\",\"+61487654321\"],\"body\":\"Test Message\"}` **Q: Can I use `Alphanumeric Identifier` from my paid plan via credit card?** A. `Alphanumeric Identifier` is only available on Telstra Account paid plans, not through credit card paid plans. **Q: How long does my dedicated number stay active for?** A. When you provision a dedicated number, by default it will be active for 30-days. You can use the `activeDays` parameter during the provisioning call to increment or decrement the number of days your dedicated number will remain active. **Q: What is the maximum sized MMS that I can send?** A. This will depend on the carrier that will receive the MMS. For Telstra it's up to 2MB, Optus up to 1.5MB and Vodafone only allows up to 500kB. You will need to check with international carriers for thier MMS size limits. **Q: Are SMILs supported by the Messaging API?** A. While there will be no error if you send an MMS with a SMIL presentation, the actual layout or sequence defined in the SMIL may not display as expected because most of the new smartphone devices ignore the SMIL presentation layer. SMIL was used in feature phones which had limited capability and SMIL allowed a *powerpoint type* presentation to be provided. Smartphones now have the capability to display video which is the better option for presentations. It is recommended that MMS messages should just drop the SMIL. **Q: How do I assign a delivery notification or callback URL?** A. You can assign a delivery notification or callback URL by adding the `notifyURL` parameter in the body of the request when you send a message. Once the message has been delivered, a notification will then be posted to this callback URL. **Q: What is the difference between the `notifyURL` parameter in the Provisoning call versus the `notifyURL` parameter in the Send Message call?** A. The `notifyURL` in the Provisoning call will be the URL where replies to the provisioned number will be posted. On the other hand, the `notifyURL` in the Send Message call will be the URL where the delivery notification will be posted, e.g. when an SMS has already been delivered to the recipient. # Getting Started Below are the steps to get started with the Telstra Messaging API. 1. Generate an OAuth2 token using your `Client key` and `Client secret`. 2. Use the Provisioning call to create a subscription and receive a dedicated number. 3. Send a message to a specific mobile number. ## Run in Postman \"Run ## Sample Apps - [Perl Sample App](https://github.com/telstra/MessagingAPI-perl-sample-app) - [Happy Chat App](https://github.com/telstra/messaging-sample-code-happy-chat) - [PHP Sample App](https://github.com/developersteve/telstra-messaging-php) ## SDK Repos - [Messaging API - PHP SDK](https://github.com/telstra/MessagingAPI-SDK-php) - [Messaging API - Python SDK](https://github.com/telstra/MessagingAPI-SDK-python) - [Messaging API - Ruby SDK](https://github.com/telstra/MessagingAPI-SDK-ruby) - [Messaging API - NodeJS SDK](https://github.com/telstra/MessagingAPI-SDK-node) - [Messaging API - .Net2 SDK](https://github.com/telstra/MessagingAPI-SDK-dotnet) - [Messaging API - Java SDK](https://github.com/telstra/MessagingAPI-SDK-Java) ## Blog Posts For more information on the Messaging API, you can read these blog posts: - [Callbacks Part 1](https://dev.telstra.com/content/understanding-messaging-api-callbacks-part-1) - [Callbacks Part 2](https://dev.telstra.com/content/understanding-messaging-api-callbacks-part-2) # noqa: E501 OpenAPI spec version: 2.2.6 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -16,23 +15,22 @@ import six -from Telstra_Messaging.models.mms_content import MMSContent # noqa: F401,E501 - class SendMmsRequest(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { '_from': 'str', 'to': 'str', 'subject': 'str', @@ -51,7 +49,7 @@ class SendMmsRequest(object): } def __init__(self, _from=None, to=None, subject=None, reply_request=None, notify_url=None, mms_content=None): # noqa: E501 - """SendMmsRequest - a model defined in Swagger""" # noqa: E501 + """SendMmsRequest - a model defined in OpenAPI""" # noqa: E501 self.__from = None self._to = None @@ -73,7 +71,7 @@ def __init__(self, _from=None, to=None, subject=None, reply_request=None, notify def _from(self): """Gets the _from of this SendMmsRequest. # noqa: E501 - This will be the source address that will be displayed on the receiving device. If it is not present then it will default to the MSISDN assigned to the app. If replyRequest is set to true, then this field will be ignored. # noqa: E501 + This will be the source address that will be displayed on the receiving device. If it is not present then it will default to the MSISDN assigned to the app. If replyRequest is set to true, then this field will be ignored. # noqa: E501 :return: The _from of this SendMmsRequest. # noqa: E501 :rtype: str @@ -84,7 +82,7 @@ def _from(self): def _from(self, _from): """Sets the _from of this SendMmsRequest. - This will be the source address that will be displayed on the receiving device. If it is not present then it will default to the MSISDN assigned to the app. If replyRequest is set to true, then this field will be ignored. # noqa: E501 + This will be the source address that will be displayed on the receiving device. If it is not present then it will default to the MSISDN assigned to the app. If replyRequest is set to true, then this field will be ignored. # noqa: E501 :param _from: The _from of this SendMmsRequest. # noqa: E501 :type: str @@ -98,7 +96,7 @@ def _from(self, _from): def to(self): """Gets the to of this SendMmsRequest. # noqa: E501 - This is the destination address. # noqa: E501 + This is the destination address. Can be an array of strings if sending to multiple numbers: \"to\":[\"+61412345678\", \"+61418765432\"] # noqa: E501 :return: The to of this SendMmsRequest. # noqa: E501 :rtype: str @@ -109,7 +107,7 @@ def to(self): def to(self, to): """Sets the to of this SendMmsRequest. - This is the destination address. # noqa: E501 + This is the destination address. Can be an array of strings if sending to multiple numbers: \"to\":[\"+61412345678\", \"+61418765432\"] # noqa: E501 :param to: The to of this SendMmsRequest. # noqa: E501 :type: str @@ -196,7 +194,7 @@ def notify_url(self, notify_url): def mms_content(self): """Gets the mms_content of this SendMmsRequest. # noqa: E501 - An Array of content that will be sent in an MMS message. If this array is present it will cause the body element to be ignored, and the message will be sent as an MMS. # noqa: E501 + An array of content that will be sent in an MMS message. If this array is present it will cause the `body` element to be ignored, and the message will be sent as an MMS. # noqa: E501 :return: The mms_content of this SendMmsRequest. # noqa: E501 :rtype: list[MMSContent] @@ -207,7 +205,7 @@ def mms_content(self): def mms_content(self, mms_content): """Sets the mms_content of this SendMmsRequest. - An Array of content that will be sent in an MMS message. If this array is present it will cause the body element to be ignored, and the message will be sent as an MMS. # noqa: E501 + An array of content that will be sent in an MMS message. If this array is present it will cause the `body` element to be ignored, and the message will be sent as an MMS. # noqa: E501 :param mms_content: The mms_content of this SendMmsRequest. # noqa: E501 :type: list[MMSContent] @@ -221,7 +219,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/Telstra_Messaging/models/send_sms_request.py b/Telstra_Messaging/models/send_sms_request.py index df6b10e..2f3baab 100644 --- a/Telstra_Messaging/models/send_sms_request.py +++ b/Telstra_Messaging/models/send_sms_request.py @@ -3,11 +3,10 @@ """ Telstra Messaging API - # Introduction Send and receive SMS and MMS messages globally using Telstra’s enterprise grade Messaging API. It also allows your application to track the delivery status of both sent and received messages. Get your dedicated Australian number, and start sending and receiving messages today. # Features

The Telstra Messaging API provides the features below.
Feature Description
Dedicated Number Provision a mobile number for your account to be used as from address in the API
Send Messages Sending SMS or MMS messages
Receive Messages Telstra will deliver messages sent to a dedicated number or to the notifyURL defined by you
Broadcast Messages Invoke a single API to send a message to a list of number provided in to
Delivery Status Query the delivery status of your messages
Callbacks Provide a notification URL and Telstra will notify your app when messages status changes
Alphanumeric Identifier Differentiate yourself by providing an alphanumeric string in from. This feature is only available on paid plans
Concatenation Send messages up to 1900 characters long and Telstra will automaticaly segment and reassemble them
Reply Request Create a chat session by associating messageId and to number to track responses received from a mobile number. We will store this association for 8 days
Character set Accepts all Unicode characters as part of UTF-8
Bounce-back response See if your SMS hits an unreachable or unallocated number (Australia Only)
Queuing Messaging API will automatically queue and deliver each message at a compliant rate.
Emoji Encoding The API supports the encoding of the full range of emojis. Emojis in the reply messages will be in their UTF-8 format.
# Getting Access to the API

  1. Register at https://dev.telstra.com.
  2. After registration, login to https://dev.telstra.com and navigate to the "My apps" page.
  3. Create your application by clicking the "Add new app" button
  4. Select "API Free Trial" Product when configuring your application. This Product includes the Telstra Messaging API as well as other APIs. Your application will be approved automatically.
  5. There is a maximum of 1000 free messages per developer. Additional messages and features can be purchased from https://dev.telstra.com.
  6. Note your Client key and Client secret as these will be needed to provision a number for your application and for authentication.

Now head over to Getting Started where you can find a postman collection as well as some links to sample apps and SDKs to get you started.

Happy Messaging! # Getting Started

Below are the steps to get started with the Telstra Messaging API.

  1. Generate OAuth2 Token using your Client key and Client secret.
  2. Create Subscription in order to receive a provisioned number.
  3. Send Message to a specific mobile number.

Run in Postman

\"Run

Sample Apps

- Perl Sample App - Happy Chat App - PHP Sample App

SDK repos

- Messaging API - PHP SDK - Messaging API - Python SDK - Messaging API - Ruby SDK - Messaging API - NodeJS SDK - Messaging API - .Net2 SDK - Messaging API - Java SDK # Delivery Notification The API provides several methods for notifying when a message has been delivered to the destination.
  1. When you provision a number there is an opportunity to specify a notifyURL, when the message has been delivered the API will make a call to this URL to advise of the message status. If this is not provided then you can make use the Get Replies API to poll for messages.
  2. If you do not specify a URL you can always call the GET /sms API get the latest replies to the message.
Please note that the notification URLs and the polling call are exclusive. If a notification URL has been set then the polling call will not provide any useful information.

Notification URL Format

When a message has reached its final state, the API will send a POST to the URL that has been previously specified.

Notification URL Format for SMS

{     to: '+61418123456'     sentTimestamp: '2017-03-17T10:05:22+10:00'     receivedTimestamp: '2017-03-17T10:05:23+10:00'     messageId: /cccb284200035236000000000ee9d074019e0301/1261418123456     deliveryStatus: DELIVRD   } 
\\ The fields are:
Field Description
to The number the message was sent to.
receivedTimestamp Time the message was sent to the API.
sentTimestamp Time handling of the message ended.
deliveryStatus The final state of the message.
messageId The same reference that was returned when the original message was sent.
receivedTimestamp Time the message was sent to the API.
Upon receiving this call it is expected that your servers will give a 204 (No Content) response. Anything else will cause the API to reattempt the call 5 minutes later.

Notification URL Format for SMS Replies

{     \"status\": \"RECEIVED\"     \"destinationAddress\": \"+61418123456\"     \"senderAddress\": \"+61421987654\"     \"message\": \"Foo\"             \"sentTimestamp\": \"2018-03-23T12:10:06+10:00\"   }                              
\\ The fields are:
Field Description
status The final state of the message.
destinationAddress The number the message was sent to.
senderAddress The number the message was sent from.
message The sontent of the SMS reply.
sentTimestamp Time handling of the message ended.

Notification URL Format for MMS Replies

{     \"status\": \"RECEIVED\",     \"destinationAddress\": \"+61418123456\",     \"senderAddress\": \"+61421987654\",     \"subject\": \"Foo\",     \"sentTimestamp\": \"2018-03-23T12:15:45+10:00\",     \"envelope\": \"string\",     \"MMSContent\":      [       {         \"type\": \"application/smil\",         \"filename\": \"smil.xml\",         \"payload\": \"string\"       },        {         \"type\": \"image/jpeg\",         \"filename\": \"sample.jpeg\",         \"payload\": \"string\"        }      ]    } 
\\ The fields are:
Field Description
status The final state of the message.
destinationAddress The number the message was sent to.
senderAddress The number the message was sent from.
subject The subject assigned to the message.
sentTimestamp Time handling of the message ended.
envelope Information about about terminal type and originating operator.
MMSContent An array of the actual content of the reply message.
type The content type of the message.
filename The filename for the message content.
payload The content of the message.
# Frequently Asked Questions **Q: Can I send a broadcast message using the Telstra Messging API?** A. Yes. Recipient numbers can be in teh form of an array of strings if a broadcast message needs to be sent.

Notes

View messaging in Swagger UI # noqa: E501 + # Introduction Send and receive SMS and MMS messages globally using Telstra’s enterprise grade Messaging API. It also allows your application to track the delivery status of both sent and received messages. Get your dedicated Australian number, and start sending and receiving messages today. # Features The Telstra Messaging API provides the features below. | Feature | Description | | --- | --- | | `Dedicated Number` | Provision a mobile number for your account to be used as `from` address in the API | | `Send Messages` | Sending SMS or MMS messages | | `Receive Messages` | Telstra will deliver messages sent to a dedicated number or to the `notifyURL` defined by you | | `Broadcast Messages` | Invoke a single API call to send a message to a list of numbers provided in `to` | | `Delivery Status` | Query the delivery status of your messages | | `Callbacks` | Provide a notification URL and Telstra will notify your app when a message status changes | | `Alphanumeric Identifier` | Differentiate yourself by providing an alphanumeric string in `from`. This feature is only available on paid plans | | `Concatenation` | Send messages up to 1900 characters long and Telstra will automaticaly segment and reassemble them | | `Reply Request` | Create a chat session by associating `messageId` and `to` number to track responses received from a mobile number. We will store this association for 8 days | | `Character set` | Accepts all Unicode characters as part of UTF-8 | | `Bounce-back response` | See if your SMS hits an unreachable or unallocated number (Australia Only) | | `Queuing` | Messaging API will automatically queue and deliver each message at a compliant rate. | | `Emoji Encoding` | The API supports the encoding of the full range of emojis. Emojis in the reply messages will be in their UTF-8 format. | ## Delivery Notification or Callbacks The API provides several methods for notifying when a message has been delivered to the destination. 1. When you send a message there is an opportunity to specify a `notifyURL`. Once the message has been delivered the API will make a call to this URL to advise of the message status. 2. If you do not specify a URL you can always call the `GET /status` API to get the status of the message. # Getting Access to the API 1. Register at [https://dev.telstra.com](https://dev.telstra.com). 2. After registration, login to [https://dev.telstra.com](https://dev.telstra.com) and navigate to the **My apps** page. 3. Create your application by clicking the **Add new app** button 4. Select **API Free Trial** Product when configuring your application. This Product includes the Telstra Messaging API as well as other free trial APIs. Your application will be approved automatically. 5. There is a maximum of 1000 free messages per developer. Additional messages and features can be purchased from [https://dev.telstra.com](https://dev.telstra.com). 6. Note your `Client key` and `Client secret` as these will be needed to provision a number for your application and for authentication. Now head over to **Getting Started** where you can find a postman collection as well as some links to sample apps and SDKs to get you started. Happy Messaging! # Frequently Asked Questions **Q: Is creating a subscription via the Provisioning call a required step?** A. Yes. You will only be able to start sending messages if you have a provisioned dedicated number. Use Provisioning to create a dedicated number subscription, or renew your dedicated number if it has expired. **Q: When trying to send an SMS I receive a `400 Bad Request` response. How can I fix this?** A. You need to make sure you have a provisioned dedicated number before you can send an SMS. If you do not have a provisioned dedicated number and you try to send a message via the API, you will get the error below in the response:
{   \"status\":\"400\",   \"code\":\"DELIVERY-IMPOSSIBLE\",   \"message\":\"Invalid \\'from\\' address specified\" }
Use Provisioning to create a dedicated number subscription, or renew your dedicated number if it has expired. **Q: Can I send a broadcast message using the Telstra Messaging API?** A. Yes. Recipient numbers can be in the form of an array of strings if a broadcast message needs to be sent, allowing you to send to multiple mobile numbers in one API call. A sample request body for this will be: `{\"to\":[\"+61412345678\",\"+61487654321\"],\"body\":\"Test Message\"}` **Q: Can I use `Alphanumeric Identifier` from my paid plan via credit card?** A. `Alphanumeric Identifier` is only available on Telstra Account paid plans, not through credit card paid plans. **Q: How long does my dedicated number stay active for?** A. When you provision a dedicated number, by default it will be active for 30-days. You can use the `activeDays` parameter during the provisioning call to increment or decrement the number of days your dedicated number will remain active. **Q: What is the maximum sized MMS that I can send?** A. This will depend on the carrier that will receive the MMS. For Telstra it's up to 2MB, Optus up to 1.5MB and Vodafone only allows up to 500kB. You will need to check with international carriers for thier MMS size limits. **Q: Are SMILs supported by the Messaging API?** A. While there will be no error if you send an MMS with a SMIL presentation, the actual layout or sequence defined in the SMIL may not display as expected because most of the new smartphone devices ignore the SMIL presentation layer. SMIL was used in feature phones which had limited capability and SMIL allowed a *powerpoint type* presentation to be provided. Smartphones now have the capability to display video which is the better option for presentations. It is recommended that MMS messages should just drop the SMIL. **Q: How do I assign a delivery notification or callback URL?** A. You can assign a delivery notification or callback URL by adding the `notifyURL` parameter in the body of the request when you send a message. Once the message has been delivered, a notification will then be posted to this callback URL. **Q: What is the difference between the `notifyURL` parameter in the Provisoning call versus the `notifyURL` parameter in the Send Message call?** A. The `notifyURL` in the Provisoning call will be the URL where replies to the provisioned number will be posted. On the other hand, the `notifyURL` in the Send Message call will be the URL where the delivery notification will be posted, e.g. when an SMS has already been delivered to the recipient. # Getting Started Below are the steps to get started with the Telstra Messaging API. 1. Generate an OAuth2 token using your `Client key` and `Client secret`. 2. Use the Provisioning call to create a subscription and receive a dedicated number. 3. Send a message to a specific mobile number. ## Run in Postman \"Run ## Sample Apps - [Perl Sample App](https://github.com/telstra/MessagingAPI-perl-sample-app) - [Happy Chat App](https://github.com/telstra/messaging-sample-code-happy-chat) - [PHP Sample App](https://github.com/developersteve/telstra-messaging-php) ## SDK Repos - [Messaging API - PHP SDK](https://github.com/telstra/MessagingAPI-SDK-php) - [Messaging API - Python SDK](https://github.com/telstra/MessagingAPI-SDK-python) - [Messaging API - Ruby SDK](https://github.com/telstra/MessagingAPI-SDK-ruby) - [Messaging API - NodeJS SDK](https://github.com/telstra/MessagingAPI-SDK-node) - [Messaging API - .Net2 SDK](https://github.com/telstra/MessagingAPI-SDK-dotnet) - [Messaging API - Java SDK](https://github.com/telstra/MessagingAPI-SDK-Java) ## Blog Posts For more information on the Messaging API, you can read these blog posts: - [Callbacks Part 1](https://dev.telstra.com/content/understanding-messaging-api-callbacks-part-1) - [Callbacks Part 2](https://dev.telstra.com/content/understanding-messaging-api-callbacks-part-2) # noqa: E501 OpenAPI spec version: 2.2.6 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,19 +17,20 @@ class SendSMSRequest(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { 'to': 'str', 'body': 'str', '_from': 'str', @@ -53,7 +53,7 @@ class SendSMSRequest(object): } def __init__(self, to=None, body=None, _from=None, validity=None, scheduled_delivery=None, notify_url=None, reply_request=None, priority=None): # noqa: E501 - """SendSMSRequest - a model defined in Swagger""" # noqa: E501 + """SendSMSRequest - a model defined in OpenAPI""" # noqa: E501 self._to = None self._body = None @@ -84,7 +84,7 @@ def __init__(self, to=None, body=None, _from=None, validity=None, scheduled_deli def to(self): """Gets the to of this SendSMSRequest. # noqa: E501 - Phone number (in E.164 format) to send the SMS to. This number can be in international format `\"to\": \"+61412345678\"` or in national format. Can be an array of strings if sending to multiple numbers: `\"to\": \"+61412345678, +61418765432\"` # noqa: E501 + Phone number (in E.164 format) to send the SMS to. This number can be in international format `\"to\": \"+61412345678\"` or in national format. Can be an array of strings if sending to multiple numbers: `\"to\":[\"+61412345678\", \"+61418765432\"]` # noqa: E501 :return: The to of this SendSMSRequest. # noqa: E501 :rtype: str @@ -95,7 +95,7 @@ def to(self): def to(self, to): """Sets the to of this SendSMSRequest. - Phone number (in E.164 format) to send the SMS to. This number can be in international format `\"to\": \"+61412345678\"` or in national format. Can be an array of strings if sending to multiple numbers: `\"to\": \"+61412345678, +61418765432\"` # noqa: E501 + Phone number (in E.164 format) to send the SMS to. This number can be in international format `\"to\": \"+61412345678\"` or in national format. Can be an array of strings if sending to multiple numbers: `\"to\":[\"+61412345678\", \"+61418765432\"]` # noqa: E501 :param to: The to of this SendSMSRequest. # noqa: E501 :type: str @@ -109,7 +109,7 @@ def to(self, to): def body(self): """Gets the body of this SendSMSRequest. # noqa: E501 - The text body of the message. Messages longer than 160 characters will be counted as multiple messages. This field contains the message text, this can be up to 1900 (for a single recipient) or 500 (for multiple recipients) UTF-8 characters. As mobile devices rarely support the full range of UTF-8 characters, it is possible that some characters may not be translated correctly by the mobile device # noqa: E501 + The text body of the message. Messages longer than 160 characters will be counted as multiple messages. This field contains the message text, this can be up to 1900 (for a single recipient) or 500 (for multiple recipients) UTF-8 characters. As mobile devices rarely support the full range of UTF-8 characters, it is possible that some characters may not be translated correctly by the mobile device # noqa: E501 :return: The body of this SendSMSRequest. # noqa: E501 :rtype: str @@ -120,7 +120,7 @@ def body(self): def body(self, body): """Sets the body of this SendSMSRequest. - The text body of the message. Messages longer than 160 characters will be counted as multiple messages. This field contains the message text, this can be up to 1900 (for a single recipient) or 500 (for multiple recipients) UTF-8 characters. As mobile devices rarely support the full range of UTF-8 characters, it is possible that some characters may not be translated correctly by the mobile device # noqa: E501 + The text body of the message. Messages longer than 160 characters will be counted as multiple messages. This field contains the message text, this can be up to 1900 (for a single recipient) or 500 (for multiple recipients) UTF-8 characters. As mobile devices rarely support the full range of UTF-8 characters, it is possible that some characters may not be translated correctly by the mobile device # noqa: E501 :param body: The body of this SendSMSRequest. # noqa: E501 :type: str @@ -272,7 +272,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/Telstra_Messaging/models/status.py b/Telstra_Messaging/models/status.py index 25b07e0..9255582 100644 --- a/Telstra_Messaging/models/status.py +++ b/Telstra_Messaging/models/status.py @@ -3,11 +3,10 @@ """ Telstra Messaging API - # Introduction Send and receive SMS and MMS messages globally using Telstra’s enterprise grade Messaging API. It also allows your application to track the delivery status of both sent and received messages. Get your dedicated Australian number, and start sending and receiving messages today. # Features

The Telstra Messaging API provides the features below.
Feature Description
Dedicated Number Provision a mobile number for your account to be used as from address in the API
Send Messages Sending SMS or MMS messages
Receive Messages Telstra will deliver messages sent to a dedicated number or to the notifyURL defined by you
Broadcast Messages Invoke a single API to send a message to a list of number provided in to
Delivery Status Query the delivery status of your messages
Callbacks Provide a notification URL and Telstra will notify your app when messages status changes
Alphanumeric Identifier Differentiate yourself by providing an alphanumeric string in from. This feature is only available on paid plans
Concatenation Send messages up to 1900 characters long and Telstra will automaticaly segment and reassemble them
Reply Request Create a chat session by associating messageId and to number to track responses received from a mobile number. We will store this association for 8 days
Character set Accepts all Unicode characters as part of UTF-8
Bounce-back response See if your SMS hits an unreachable or unallocated number (Australia Only)
Queuing Messaging API will automatically queue and deliver each message at a compliant rate.
Emoji Encoding The API supports the encoding of the full range of emojis. Emojis in the reply messages will be in their UTF-8 format.
# Getting Access to the API

  1. Register at https://dev.telstra.com.
  2. After registration, login to https://dev.telstra.com and navigate to the "My apps" page.
  3. Create your application by clicking the "Add new app" button
  4. Select "API Free Trial" Product when configuring your application. This Product includes the Telstra Messaging API as well as other APIs. Your application will be approved automatically.
  5. There is a maximum of 1000 free messages per developer. Additional messages and features can be purchased from https://dev.telstra.com.
  6. Note your Client key and Client secret as these will be needed to provision a number for your application and for authentication.

Now head over to Getting Started where you can find a postman collection as well as some links to sample apps and SDKs to get you started.

Happy Messaging! # Getting Started

Below are the steps to get started with the Telstra Messaging API.

  1. Generate OAuth2 Token using your Client key and Client secret.
  2. Create Subscription in order to receive a provisioned number.
  3. Send Message to a specific mobile number.

Run in Postman

\"Run

Sample Apps

- Perl Sample App - Happy Chat App - PHP Sample App

SDK repos

- Messaging API - PHP SDK - Messaging API - Python SDK - Messaging API - Ruby SDK - Messaging API - NodeJS SDK - Messaging API - .Net2 SDK - Messaging API - Java SDK # Delivery Notification The API provides several methods for notifying when a message has been delivered to the destination.
  1. When you provision a number there is an opportunity to specify a notifyURL, when the message has been delivered the API will make a call to this URL to advise of the message status. If this is not provided then you can make use the Get Replies API to poll for messages.
  2. If you do not specify a URL you can always call the GET /sms API get the latest replies to the message.
Please note that the notification URLs and the polling call are exclusive. If a notification URL has been set then the polling call will not provide any useful information.

Notification URL Format

When a message has reached its final state, the API will send a POST to the URL that has been previously specified.

Notification URL Format for SMS

{     to: '+61418123456'     sentTimestamp: '2017-03-17T10:05:22+10:00'     receivedTimestamp: '2017-03-17T10:05:23+10:00'     messageId: /cccb284200035236000000000ee9d074019e0301/1261418123456     deliveryStatus: DELIVRD   } 
\\ The fields are:
Field Description
to The number the message was sent to.
receivedTimestamp Time the message was sent to the API.
sentTimestamp Time handling of the message ended.
deliveryStatus The final state of the message.
messageId The same reference that was returned when the original message was sent.
receivedTimestamp Time the message was sent to the API.
Upon receiving this call it is expected that your servers will give a 204 (No Content) response. Anything else will cause the API to reattempt the call 5 minutes later.

Notification URL Format for SMS Replies

{     \"status\": \"RECEIVED\"     \"destinationAddress\": \"+61418123456\"     \"senderAddress\": \"+61421987654\"     \"message\": \"Foo\"             \"sentTimestamp\": \"2018-03-23T12:10:06+10:00\"   }                              
\\ The fields are:
Field Description
status The final state of the message.
destinationAddress The number the message was sent to.
senderAddress The number the message was sent from.
message The sontent of the SMS reply.
sentTimestamp Time handling of the message ended.

Notification URL Format for MMS Replies

{     \"status\": \"RECEIVED\",     \"destinationAddress\": \"+61418123456\",     \"senderAddress\": \"+61421987654\",     \"subject\": \"Foo\",     \"sentTimestamp\": \"2018-03-23T12:15:45+10:00\",     \"envelope\": \"string\",     \"MMSContent\":      [       {         \"type\": \"application/smil\",         \"filename\": \"smil.xml\",         \"payload\": \"string\"       },        {         \"type\": \"image/jpeg\",         \"filename\": \"sample.jpeg\",         \"payload\": \"string\"        }      ]    } 
\\ The fields are:
Field Description
status The final state of the message.
destinationAddress The number the message was sent to.
senderAddress The number the message was sent from.
subject The subject assigned to the message.
sentTimestamp Time handling of the message ended.
envelope Information about about terminal type and originating operator.
MMSContent An array of the actual content of the reply message.
type The content type of the message.
filename The filename for the message content.
payload The content of the message.
# Frequently Asked Questions **Q: Can I send a broadcast message using the Telstra Messging API?** A. Yes. Recipient numbers can be in teh form of an array of strings if a broadcast message needs to be sent.

Notes

View messaging in Swagger UI # noqa: E501 + # Introduction Send and receive SMS and MMS messages globally using Telstra’s enterprise grade Messaging API. It also allows your application to track the delivery status of both sent and received messages. Get your dedicated Australian number, and start sending and receiving messages today. # Features The Telstra Messaging API provides the features below. | Feature | Description | | --- | --- | | `Dedicated Number` | Provision a mobile number for your account to be used as `from` address in the API | | `Send Messages` | Sending SMS or MMS messages | | `Receive Messages` | Telstra will deliver messages sent to a dedicated number or to the `notifyURL` defined by you | | `Broadcast Messages` | Invoke a single API call to send a message to a list of numbers provided in `to` | | `Delivery Status` | Query the delivery status of your messages | | `Callbacks` | Provide a notification URL and Telstra will notify your app when a message status changes | | `Alphanumeric Identifier` | Differentiate yourself by providing an alphanumeric string in `from`. This feature is only available on paid plans | | `Concatenation` | Send messages up to 1900 characters long and Telstra will automaticaly segment and reassemble them | | `Reply Request` | Create a chat session by associating `messageId` and `to` number to track responses received from a mobile number. We will store this association for 8 days | | `Character set` | Accepts all Unicode characters as part of UTF-8 | | `Bounce-back response` | See if your SMS hits an unreachable or unallocated number (Australia Only) | | `Queuing` | Messaging API will automatically queue and deliver each message at a compliant rate. | | `Emoji Encoding` | The API supports the encoding of the full range of emojis. Emojis in the reply messages will be in their UTF-8 format. | ## Delivery Notification or Callbacks The API provides several methods for notifying when a message has been delivered to the destination. 1. When you send a message there is an opportunity to specify a `notifyURL`. Once the message has been delivered the API will make a call to this URL to advise of the message status. 2. If you do not specify a URL you can always call the `GET /status` API to get the status of the message. # Getting Access to the API 1. Register at [https://dev.telstra.com](https://dev.telstra.com). 2. After registration, login to [https://dev.telstra.com](https://dev.telstra.com) and navigate to the **My apps** page. 3. Create your application by clicking the **Add new app** button 4. Select **API Free Trial** Product when configuring your application. This Product includes the Telstra Messaging API as well as other free trial APIs. Your application will be approved automatically. 5. There is a maximum of 1000 free messages per developer. Additional messages and features can be purchased from [https://dev.telstra.com](https://dev.telstra.com). 6. Note your `Client key` and `Client secret` as these will be needed to provision a number for your application and for authentication. Now head over to **Getting Started** where you can find a postman collection as well as some links to sample apps and SDKs to get you started. Happy Messaging! # Frequently Asked Questions **Q: Is creating a subscription via the Provisioning call a required step?** A. Yes. You will only be able to start sending messages if you have a provisioned dedicated number. Use Provisioning to create a dedicated number subscription, or renew your dedicated number if it has expired. **Q: When trying to send an SMS I receive a `400 Bad Request` response. How can I fix this?** A. You need to make sure you have a provisioned dedicated number before you can send an SMS. If you do not have a provisioned dedicated number and you try to send a message via the API, you will get the error below in the response:
{   \"status\":\"400\",   \"code\":\"DELIVERY-IMPOSSIBLE\",   \"message\":\"Invalid \\'from\\' address specified\" }
Use Provisioning to create a dedicated number subscription, or renew your dedicated number if it has expired. **Q: Can I send a broadcast message using the Telstra Messaging API?** A. Yes. Recipient numbers can be in the form of an array of strings if a broadcast message needs to be sent, allowing you to send to multiple mobile numbers in one API call. A sample request body for this will be: `{\"to\":[\"+61412345678\",\"+61487654321\"],\"body\":\"Test Message\"}` **Q: Can I use `Alphanumeric Identifier` from my paid plan via credit card?** A. `Alphanumeric Identifier` is only available on Telstra Account paid plans, not through credit card paid plans. **Q: How long does my dedicated number stay active for?** A. When you provision a dedicated number, by default it will be active for 30-days. You can use the `activeDays` parameter during the provisioning call to increment or decrement the number of days your dedicated number will remain active. **Q: What is the maximum sized MMS that I can send?** A. This will depend on the carrier that will receive the MMS. For Telstra it's up to 2MB, Optus up to 1.5MB and Vodafone only allows up to 500kB. You will need to check with international carriers for thier MMS size limits. **Q: Are SMILs supported by the Messaging API?** A. While there will be no error if you send an MMS with a SMIL presentation, the actual layout or sequence defined in the SMIL may not display as expected because most of the new smartphone devices ignore the SMIL presentation layer. SMIL was used in feature phones which had limited capability and SMIL allowed a *powerpoint type* presentation to be provided. Smartphones now have the capability to display video which is the better option for presentations. It is recommended that MMS messages should just drop the SMIL. **Q: How do I assign a delivery notification or callback URL?** A. You can assign a delivery notification or callback URL by adding the `notifyURL` parameter in the body of the request when you send a message. Once the message has been delivered, a notification will then be posted to this callback URL. **Q: What is the difference between the `notifyURL` parameter in the Provisoning call versus the `notifyURL` parameter in the Send Message call?** A. The `notifyURL` in the Provisoning call will be the URL where replies to the provisioned number will be posted. On the other hand, the `notifyURL` in the Send Message call will be the URL where the delivery notification will be posted, e.g. when an SMS has already been delivered to the recipient. # Getting Started Below are the steps to get started with the Telstra Messaging API. 1. Generate an OAuth2 token using your `Client key` and `Client secret`. 2. Use the Provisioning call to create a subscription and receive a dedicated number. 3. Send a message to a specific mobile number. ## Run in Postman \"Run ## Sample Apps - [Perl Sample App](https://github.com/telstra/MessagingAPI-perl-sample-app) - [Happy Chat App](https://github.com/telstra/messaging-sample-code-happy-chat) - [PHP Sample App](https://github.com/developersteve/telstra-messaging-php) ## SDK Repos - [Messaging API - PHP SDK](https://github.com/telstra/MessagingAPI-SDK-php) - [Messaging API - Python SDK](https://github.com/telstra/MessagingAPI-SDK-python) - [Messaging API - Ruby SDK](https://github.com/telstra/MessagingAPI-SDK-ruby) - [Messaging API - NodeJS SDK](https://github.com/telstra/MessagingAPI-SDK-node) - [Messaging API - .Net2 SDK](https://github.com/telstra/MessagingAPI-SDK-dotnet) - [Messaging API - Java SDK](https://github.com/telstra/MessagingAPI-SDK-Java) ## Blog Posts For more information on the Messaging API, you can read these blog posts: - [Callbacks Part 1](https://dev.telstra.com/content/understanding-messaging-api-callbacks-part-1) - [Callbacks Part 2](https://dev.telstra.com/content/understanding-messaging-api-callbacks-part-2) # noqa: E501 OpenAPI spec version: 2.2.6 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -18,7 +17,8 @@ class Status(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ @@ -37,26 +37,26 @@ class Status(object): """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { + openapi_types = { } attribute_map = { } def __init__(self): # noqa: E501 - """Status - a model defined in Swagger""" # noqa: E501 + """Status - a model defined in OpenAPI""" # noqa: E501 self.discriminator = None def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( diff --git a/Telstra_Messaging/rest.py b/Telstra_Messaging/rest.py index 9dacd16..cdef5e8 100644 --- a/Telstra_Messaging/rest.py +++ b/Telstra_Messaging/rest.py @@ -3,11 +3,10 @@ """ Telstra Messaging API - # Introduction Send and receive SMS and MMS messages globally using Telstra’s enterprise grade Messaging API. It also allows your application to track the delivery status of both sent and received messages. Get your dedicated Australian number, and start sending and receiving messages today. # Features

The Telstra Messaging API provides the features below.
Feature Description
Dedicated Number Provision a mobile number for your account to be used as from address in the API
Send Messages Sending SMS or MMS messages
Receive Messages Telstra will deliver messages sent to a dedicated number or to the notifyURL defined by you
Broadcast Messages Invoke a single API to send a message to a list of number provided in to
Delivery Status Query the delivery status of your messages
Callbacks Provide a notification URL and Telstra will notify your app when messages status changes
Alphanumeric Identifier Differentiate yourself by providing an alphanumeric string in from. This feature is only available on paid plans
Concatenation Send messages up to 1900 characters long and Telstra will automaticaly segment and reassemble them
Reply Request Create a chat session by associating messageId and to number to track responses received from a mobile number. We will store this association for 8 days
Character set Accepts all Unicode characters as part of UTF-8
Bounce-back response See if your SMS hits an unreachable or unallocated number (Australia Only)
Queuing Messaging API will automatically queue and deliver each message at a compliant rate.
Emoji Encoding The API supports the encoding of the full range of emojis. Emojis in the reply messages will be in their UTF-8 format.
# Getting Access to the API

  1. Register at https://dev.telstra.com.
  2. After registration, login to https://dev.telstra.com and navigate to the "My apps" page.
  3. Create your application by clicking the "Add new app" button
  4. Select "API Free Trial" Product when configuring your application. This Product includes the Telstra Messaging API as well as other APIs. Your application will be approved automatically.
  5. There is a maximum of 1000 free messages per developer. Additional messages and features can be purchased from https://dev.telstra.com.
  6. Note your Client key and Client secret as these will be needed to provision a number for your application and for authentication.

Now head over to Getting Started where you can find a postman collection as well as some links to sample apps and SDKs to get you started.

Happy Messaging! # Getting Started

Below are the steps to get started with the Telstra Messaging API.

  1. Generate OAuth2 Token using your Client key and Client secret.
  2. Create Subscription in order to receive a provisioned number.
  3. Send Message to a specific mobile number.

Run in Postman

\"Run

Sample Apps

- Perl Sample App - Happy Chat App - PHP Sample App

SDK repos

- Messaging API - PHP SDK - Messaging API - Python SDK - Messaging API - Ruby SDK - Messaging API - NodeJS SDK - Messaging API - .Net2 SDK - Messaging API - Java SDK # Delivery Notification The API provides several methods for notifying when a message has been delivered to the destination.
  1. When you provision a number there is an opportunity to specify a notifyURL, when the message has been delivered the API will make a call to this URL to advise of the message status. If this is not provided then you can make use the Get Replies API to poll for messages.
  2. If you do not specify a URL you can always call the GET /sms API get the latest replies to the message.
Please note that the notification URLs and the polling call are exclusive. If a notification URL has been set then the polling call will not provide any useful information.

Notification URL Format

When a message has reached its final state, the API will send a POST to the URL that has been previously specified.

Notification URL Format for SMS

{     to: '+61418123456'     sentTimestamp: '2017-03-17T10:05:22+10:00'     receivedTimestamp: '2017-03-17T10:05:23+10:00'     messageId: /cccb284200035236000000000ee9d074019e0301/1261418123456     deliveryStatus: DELIVRD   } 
\\ The fields are:
Field Description
to The number the message was sent to.
receivedTimestamp Time the message was sent to the API.
sentTimestamp Time handling of the message ended.
deliveryStatus The final state of the message.
messageId The same reference that was returned when the original message was sent.
receivedTimestamp Time the message was sent to the API.
Upon receiving this call it is expected that your servers will give a 204 (No Content) response. Anything else will cause the API to reattempt the call 5 minutes later.

Notification URL Format for SMS Replies

{     \"status\": \"RECEIVED\"     \"destinationAddress\": \"+61418123456\"     \"senderAddress\": \"+61421987654\"     \"message\": \"Foo\"             \"sentTimestamp\": \"2018-03-23T12:10:06+10:00\"   }                              
\\ The fields are:
Field Description
status The final state of the message.
destinationAddress The number the message was sent to.
senderAddress The number the message was sent from.
message The sontent of the SMS reply.
sentTimestamp Time handling of the message ended.

Notification URL Format for MMS Replies

{     \"status\": \"RECEIVED\",     \"destinationAddress\": \"+61418123456\",     \"senderAddress\": \"+61421987654\",     \"subject\": \"Foo\",     \"sentTimestamp\": \"2018-03-23T12:15:45+10:00\",     \"envelope\": \"string\",     \"MMSContent\":      [       {         \"type\": \"application/smil\",         \"filename\": \"smil.xml\",         \"payload\": \"string\"       },        {         \"type\": \"image/jpeg\",         \"filename\": \"sample.jpeg\",         \"payload\": \"string\"        }      ]    } 
\\ The fields are:
Field Description
status The final state of the message.
destinationAddress The number the message was sent to.
senderAddress The number the message was sent from.
subject The subject assigned to the message.
sentTimestamp Time handling of the message ended.
envelope Information about about terminal type and originating operator.
MMSContent An array of the actual content of the reply message.
type The content type of the message.
filename The filename for the message content.
payload The content of the message.
# Frequently Asked Questions **Q: Can I send a broadcast message using the Telstra Messging API?** A. Yes. Recipient numbers can be in teh form of an array of strings if a broadcast message needs to be sent.

Notes

View messaging in Swagger UI # noqa: E501 + # Introduction Send and receive SMS and MMS messages globally using Telstra’s enterprise grade Messaging API. It also allows your application to track the delivery status of both sent and received messages. Get your dedicated Australian number, and start sending and receiving messages today. # Features The Telstra Messaging API provides the features below. | Feature | Description | | --- | --- | | `Dedicated Number` | Provision a mobile number for your account to be used as `from` address in the API | | `Send Messages` | Sending SMS or MMS messages | | `Receive Messages` | Telstra will deliver messages sent to a dedicated number or to the `notifyURL` defined by you | | `Broadcast Messages` | Invoke a single API call to send a message to a list of numbers provided in `to` | | `Delivery Status` | Query the delivery status of your messages | | `Callbacks` | Provide a notification URL and Telstra will notify your app when a message status changes | | `Alphanumeric Identifier` | Differentiate yourself by providing an alphanumeric string in `from`. This feature is only available on paid plans | | `Concatenation` | Send messages up to 1900 characters long and Telstra will automaticaly segment and reassemble them | | `Reply Request` | Create a chat session by associating `messageId` and `to` number to track responses received from a mobile number. We will store this association for 8 days | | `Character set` | Accepts all Unicode characters as part of UTF-8 | | `Bounce-back response` | See if your SMS hits an unreachable or unallocated number (Australia Only) | | `Queuing` | Messaging API will automatically queue and deliver each message at a compliant rate. | | `Emoji Encoding` | The API supports the encoding of the full range of emojis. Emojis in the reply messages will be in their UTF-8 format. | ## Delivery Notification or Callbacks The API provides several methods for notifying when a message has been delivered to the destination. 1. When you send a message there is an opportunity to specify a `notifyURL`. Once the message has been delivered the API will make a call to this URL to advise of the message status. 2. If you do not specify a URL you can always call the `GET /status` API to get the status of the message. # Getting Access to the API 1. Register at [https://dev.telstra.com](https://dev.telstra.com). 2. After registration, login to [https://dev.telstra.com](https://dev.telstra.com) and navigate to the **My apps** page. 3. Create your application by clicking the **Add new app** button 4. Select **API Free Trial** Product when configuring your application. This Product includes the Telstra Messaging API as well as other free trial APIs. Your application will be approved automatically. 5. There is a maximum of 1000 free messages per developer. Additional messages and features can be purchased from [https://dev.telstra.com](https://dev.telstra.com). 6. Note your `Client key` and `Client secret` as these will be needed to provision a number for your application and for authentication. Now head over to **Getting Started** where you can find a postman collection as well as some links to sample apps and SDKs to get you started. Happy Messaging! # Frequently Asked Questions **Q: Is creating a subscription via the Provisioning call a required step?** A. Yes. You will only be able to start sending messages if you have a provisioned dedicated number. Use Provisioning to create a dedicated number subscription, or renew your dedicated number if it has expired. **Q: When trying to send an SMS I receive a `400 Bad Request` response. How can I fix this?** A. You need to make sure you have a provisioned dedicated number before you can send an SMS. If you do not have a provisioned dedicated number and you try to send a message via the API, you will get the error below in the response:
{   \"status\":\"400\",   \"code\":\"DELIVERY-IMPOSSIBLE\",   \"message\":\"Invalid \\'from\\' address specified\" }
Use Provisioning to create a dedicated number subscription, or renew your dedicated number if it has expired. **Q: Can I send a broadcast message using the Telstra Messaging API?** A. Yes. Recipient numbers can be in the form of an array of strings if a broadcast message needs to be sent, allowing you to send to multiple mobile numbers in one API call. A sample request body for this will be: `{\"to\":[\"+61412345678\",\"+61487654321\"],\"body\":\"Test Message\"}` **Q: Can I use `Alphanumeric Identifier` from my paid plan via credit card?** A. `Alphanumeric Identifier` is only available on Telstra Account paid plans, not through credit card paid plans. **Q: How long does my dedicated number stay active for?** A. When you provision a dedicated number, by default it will be active for 30-days. You can use the `activeDays` parameter during the provisioning call to increment or decrement the number of days your dedicated number will remain active. **Q: What is the maximum sized MMS that I can send?** A. This will depend on the carrier that will receive the MMS. For Telstra it's up to 2MB, Optus up to 1.5MB and Vodafone only allows up to 500kB. You will need to check with international carriers for thier MMS size limits. **Q: Are SMILs supported by the Messaging API?** A. While there will be no error if you send an MMS with a SMIL presentation, the actual layout or sequence defined in the SMIL may not display as expected because most of the new smartphone devices ignore the SMIL presentation layer. SMIL was used in feature phones which had limited capability and SMIL allowed a *powerpoint type* presentation to be provided. Smartphones now have the capability to display video which is the better option for presentations. It is recommended that MMS messages should just drop the SMIL. **Q: How do I assign a delivery notification or callback URL?** A. You can assign a delivery notification or callback URL by adding the `notifyURL` parameter in the body of the request when you send a message. Once the message has been delivered, a notification will then be posted to this callback URL. **Q: What is the difference between the `notifyURL` parameter in the Provisoning call versus the `notifyURL` parameter in the Send Message call?** A. The `notifyURL` in the Provisoning call will be the URL where replies to the provisioned number will be posted. On the other hand, the `notifyURL` in the Send Message call will be the URL where the delivery notification will be posted, e.g. when an SMS has already been delivered to the recipient. # Getting Started Below are the steps to get started with the Telstra Messaging API. 1. Generate an OAuth2 token using your `Client key` and `Client secret`. 2. Use the Provisioning call to create a subscription and receive a dedicated number. 3. Send a message to a specific mobile number. ## Run in Postman \"Run ## Sample Apps - [Perl Sample App](https://github.com/telstra/MessagingAPI-perl-sample-app) - [Happy Chat App](https://github.com/telstra/messaging-sample-code-happy-chat) - [PHP Sample App](https://github.com/developersteve/telstra-messaging-php) ## SDK Repos - [Messaging API - PHP SDK](https://github.com/telstra/MessagingAPI-SDK-php) - [Messaging API - Python SDK](https://github.com/telstra/MessagingAPI-SDK-python) - [Messaging API - Ruby SDK](https://github.com/telstra/MessagingAPI-SDK-ruby) - [Messaging API - NodeJS SDK](https://github.com/telstra/MessagingAPI-SDK-node) - [Messaging API - .Net2 SDK](https://github.com/telstra/MessagingAPI-SDK-dotnet) - [Messaging API - Java SDK](https://github.com/telstra/MessagingAPI-SDK-Java) ## Blog Posts For more information on the Messaging API, you can read these blog posts: - [Callbacks Part 1](https://dev.telstra.com/content/understanding-messaging-api-callbacks-part-1) - [Callbacks Part 2](https://dev.telstra.com/content/understanding-messaging-api-callbacks-part-2) # noqa: E501 OpenAPI spec version: 2.2.6 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -27,7 +26,7 @@ try: import urllib3 except ImportError: - raise ImportError('Swagger python client requires urllib3.') + raise ImportError('OpenAPI Python client requires urllib3.') logger = logging.getLogger(__name__) diff --git a/docs/AuthenticationApi.md b/docs/AuthenticationApi.md index 68940fc..f6c24cf 100644 --- a/docs/AuthenticationApi.md +++ b/docs/AuthenticationApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description Generate OAuth2 token -To generate an OAuth2 Authentication token, pass through your `Client key` and `Client secret` that you received when you registered for the "API Free Trial" Product. The grant_type should be left as `client_credentials` and the scope as `NSMS`. The token will expire in one hour.
   #!/bin/bash   # Obtain these keys from the Telstra Developer Portal   CLIENT_KEY=\"your client key\"   CLIENT_SECRET=\"your client secret\"   curl -X POST -H 'Content-Type: application/x-www-form-urlencoded' \\   -d 'grant_type=client_credentials&client_id=$CLIENT_KEY&client_secret=CLIENT_SECRET&scope=NSMS' \\   'https://tapi.telstra.com/v2/oauth/token' 
+To generate an OAuth2 Authentication token, pass through your `Client key` and `Client secret` that you received when you registered for the **API Free Trial** Product. The grant_type should be left as `client_credentials` and the scope as `NSMS`. The token will expire in one hour. ### Example ```python @@ -26,7 +26,7 @@ from pprint import pprint api_instance = Telstra_Messaging.AuthenticationApi() client_id = 'client_id_example' # str | client_secret = 'client_secret_example' # str | -grant_type = 'client_credentials' # str | (default to client_credentials) +grant_type = 'client_credentials' # str | (default to 'client_credentials') try: # Generate OAuth2 token @@ -42,7 +42,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **client_id** | **str**| | **client_secret** | **str**| | - **grant_type** | **str**| | [default to client_credentials] + **grant_type** | **str**| | [default to 'client_credentials'] ### Return type diff --git a/docs/InboundPollResponse.md b/docs/InboundPollResponse.md index 8fcd3f2..6771221 100644 --- a/docs/InboundPollResponse.md +++ b/docs/InboundPollResponse.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **status** | **str** | message status | [optional] -**destination_address** | **str** | The phone number (recipient) that the message was sent to(in E.164 format). | [optional] -**sender_address** | **str** | The phone number (sender) that the message was sent from (in E.164 format). | [optional] +**destination_address** | **str** | The phone number (recipient) that the message was sent to (in E.164 format). | [optional] +**sender_address** | **str** | The phone number (sender) that the message was sent from (in E.164 format). | [optional] **message** | **str** | Text of the message that was sent | [optional] **message_id** | **str** | Message Id | [optional] **sent_timestamp** | **str** | The date and time when the message was sent by recipient. | [optional] diff --git a/docs/MMSContent.md b/docs/MMSContent.md index 5eef863..9c319e8 100644 --- a/docs/MMSContent.md +++ b/docs/MMSContent.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **str** | The following types are supported audio/amr audio/aac audio/mp3 audio/mpeg3 audio/mpeg audio/mpg audio/wav audio/3gpp audio/mp4 image/gif image/jpeg image/jpg image/png image/bmp video/mpeg4 video/mp4 video/mpeg video/3gpp video/3gp video/h263 text/plain text/x-vCard text/x-vCalendar | +**type** | **str** | The following types are supported audio/amr audio/aac audio/mp3 audio/mpeg3 audio/mpeg audio/mpg audio/wav audio/3gpp audio/mp4 image/gif image/jpeg image/jpg image/png image/bmp video/mpeg4 video/mp4 video/mpeg video/3gpp video/3gp video/h263 text/plain text/x-vCard text/x-vCalendar\" | **filename** | **str** | The file name to be associated with the content. Some devices will display this file name with a placeholder for the content. | **payload** | **str** | | diff --git a/docs/MessagingApi.md b/docs/MessagingApi.md index 2e24cb8..c0a76f7 100644 --- a/docs/MessagingApi.md +++ b/docs/MessagingApi.md @@ -6,6 +6,7 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**get_mms_status**](MessagingApi.md#get_mms_status) | **GET** /messages/mms/{messageid}/status | Get MMS Status [**get_sms_status**](MessagingApi.md#get_sms_status) | **GET** /messages/sms/{messageId}/status | Get SMS Status +[**retrieve_mms_responses**](MessagingApi.md#retrieve_mms_responses) | **GET** /messages/mms | Retrieve MMS Responses [**retrieve_sms_responses**](MessagingApi.md#retrieve_sms_responses) | **GET** /messages/sms | Retrieve SMS Responses [**send_mms**](MessagingApi.md#send_mms) | **POST** /messages/mms | Send MMS [**send_sms**](MessagingApi.md#send_sms) | **POST** /messages/sms | Send SMS @@ -32,7 +33,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class api_instance = Telstra_Messaging.MessagingApi(Telstra_Messaging.ApiClient(configuration)) -messageid = 'messageid_example' # str | Unique identifier of a message - it is the value returned from a previous POST call to https://api.telstra.com/v2/messages/mms +messageid = 'messageid_example' # str | Unique identifier of a message - it is the value returned from a previous POST call to https://api.telstra.com/v2/messages/mms try: # Get MMS Status @@ -46,7 +47,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **messageid** | **str**| Unique identifier of a message - it is the value returned from a previous POST call to https://api.telstra.com/v2/messages/mms | + **messageid** | **str**| Unique identifier of a message - it is the value returned from a previous POST call to https://api.telstra.com/v2/messages/mms | ### Return type @@ -58,7 +59,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -68,7 +69,7 @@ Name | Type | Description | Notes Get SMS Status -If no notification URL has been specified, it is possible to poll for the message status.
  #!/bin/bash   #!/bin/bash   # Example of how to poll for a message status   AccessToken=\"Consumer Access Token\"   MessageId=\"Previous supplied Message Id, URL encoded\"   curl -X get -H \"Authorization: Bearer $AccessToken\" \\     -H \"Content-Type: application/json\" \\     \"https://tapi.telstra.com/v2/messages/sms/$MessageId\" 
Note that the `MessageId` that appears in the URL must be URL encoded, just copying the `MessageId` as it was supplied when submitting the message may not work. +If no notification URL has been specified, it is possible to poll for the message status. Note that the `MessageId` that appears in the URL must be URL encoded. Just copying the `MessageId` as it was supplied when submitting the message may not work. SMS Status with Notification URL --- When a message has reached its final state, the API will send a POST to the URL that has been previously specified.
{     to: '+61418123456'     sentTimestamp: '2017-03-17T10:05:22+10:00'     receivedTimestamp: '2017-03-17T10:05:23+10:00'     messageId: /cccb284200035236000000000ee9d074019e0301/1261418123456     deliveryStatus: DELIVRD   } 
The fields are:
Field Description
to The number the message was sent to.
receivedTimestamp Time the message was sent to the API.
sentTimestamp Time handling of the message ended.
deliveryStatus The final state of the message.
messageId The same reference that was returned when the original message was sent.
receivedTimestamp Time the message was sent to the API.
Upon receiving this call it is expected that your servers will give a 204 (No Content) response. Anything else will cause the API to reattempt the call 5 minutes later. ### Example ```python @@ -84,7 +85,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class api_instance = Telstra_Messaging.MessagingApi(Telstra_Messaging.ApiClient(configuration)) -message_id = 'message_id_example' # str | Unique identifier of a message - it is the value returned from a previous POST call to https://api.telstra.com/v2/messages/sms. +message_id = 'message_id_example' # str | Unique identifier of a message - it is the value returned from a previous POST call to https://api.telstra.com/v2/messages/sms. try: # Get SMS Status @@ -98,7 +99,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **message_id** | **str**| Unique identifier of a message - it is the value returned from a previous POST call to https://api.telstra.com/v2/messages/sms. | + **message_id** | **str**| Unique identifier of a message - it is the value returned from a previous POST call to https://api.telstra.com/v2/messages/sms. | ### Return type @@ -110,7 +111,55 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **retrieve_mms_responses** +> list[MMSContent] retrieve_mms_responses() + +Retrieve MMS Responses + +Messages are retrieved one at a time, starting with the earliest response. If the subscription has a `notifyURL`, response messages will be logged there instead. # Notification URL Format for MMS Replies
{   \"status\": \"RECEIVED\",   \"destinationAddress\": \"+61418123456\",   \"senderAddress\": \"+61421987654\",   \"subject\": \"Foo\",   \"sentTimestamp\": \"2018-03-23T12:15:45+10:00\",   \"envelope\": \"string\",   \"MMSContent\":     [       {         \"type\": \"text/plain\",         \"filename\": \"text_1.txt\",         \"payload\": \"string\"       },       {         \"type\": \"image/jpeg\",         \"filename\": \"sample.jpeg\",         \"payload\": \"string\"       }     ] }
The fields are: | Field | Description | | --- | --- | | `status` | The final state of the message. | | `destinationAddress` |The number the message was sent to. | | `senderAddress` | The number the message was sent from. | | `subject` | The subject assigned to the message. | | `sentTimestamp` | Time handling of the message ended. | | `envelope` | Information about about terminal type and originating operator. | | `MMSContent` | An array of the actual content of the reply message. | | `type` | The content type of the message. | | `filename` | The filename for the message content. | | `payload` | The content of the message. | + +### Example +```python +from __future__ import print_function +import time +import Telstra_Messaging +from Telstra_Messaging.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: auth +configuration = Telstra_Messaging.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = Telstra_Messaging.MessagingApi(Telstra_Messaging.ApiClient(configuration)) + +try: + # Retrieve MMS Responses + api_response = api_instance.retrieve_mms_responses() + pprint(api_response) +except ApiException as e: + print("Exception when calling MessagingApi->retrieve_mms_responses: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**list[MMSContent]**](MMSContent.md) + +### Authorization + +[auth](../README.md#auth) + +### HTTP request headers + + - **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -120,7 +169,7 @@ Name | Type | Description | Notes Retrieve SMS Responses -Messages are retrieved one at a time, starting with the earliest response. The API supports the encoding of the full range of emojis in the reply message. The emojis will be in their UTF-8 format. If the subscription has a `notifyURL`, response messages will be logged there instead. +Messages are retrieved one at a time, starting with the earliest response. The API supports the encoding of the full range of emojis in the reply message. The emojis will be in their UTF-8 format. If the subscription has a `notifyURL`, response messages will be logged there instead. # Notification URL Format for SMS Response
{   \"to\":\"+61472880123\",   \"from\":\"+61412345678\",   \"body\":\"Foo4\",   \"sentTimestamp\":\"2018-04-20T14:24:35\",   \"messageId\":\"DMASApiA0000000146\" }
The fields are: | Field | Description | | --- |--- | | `to` | The number the message was sent to. | | `from` | The number the message was sent from. | | `body` | The content of the SMS response. | | `sentTimestamp` | Time handling of the message ended. | | `messageId` | The ID assigned to the message. | ### Example ```python @@ -158,13 +207,13 @@ This endpoint does not need any parameter. ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **send_mms** -> MessageSentResponse send_mms(body) +> MessageSentResponse send_mms(send_mms_request) Send MMS @@ -184,11 +233,13 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class api_instance = Telstra_Messaging.MessagingApi(Telstra_Messaging.ApiClient(configuration)) -body = Telstra_Messaging.SendMmsRequest() # SendMmsRequest | A JSON or XML payload containing the recipient's phone number and MMS message.The recipient number should be in the format '04xxxxxxxx' where x is a digit +send_mms_request = Telstra_Messaging.SendMmsRequest() # SendMmsRequest | A JSON or XML payload containing the recipient's phone number and MMS message. +The recipient number should be in the format '04xxxxxxxx' where x is a digit. + try: # Send MMS - api_response = api_instance.send_mms(body) + api_response = api_instance.send_mms(send_mms_request) pprint(api_response) except ApiException as e: print("Exception when calling MessagingApi->send_mms: %s\n" % e) @@ -198,7 +249,9 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**SendMmsRequest**](SendMmsRequest.md)| A JSON or XML payload containing the recipient's phone number and MMS message.The recipient number should be in the format '04xxxxxxxx' where x is a digit | + **send_mms_request** | [**SendMmsRequest**](SendMmsRequest.md)| A JSON or XML payload containing the recipient's phone number and MMS message. +The recipient number should be in the format '04xxxxxxxx' where x is a digit. + | ### Return type @@ -216,11 +269,11 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **send_sms** -> MessageSentResponse send_sms(payload) +> MessageSentResponse send_sms(send_sms_request) Send SMS -Send an SMS Message to a single or multiple mobile number/s.

Send message to a single number:

  #!/bin/bash   # Use the Messaging API-v2 to send an SMS   # Note: only to: and body: are required   AccessToken=\"Access Token\"   Dest=\"Destination number\"   curl -X POST -H \"Authorization: Bearer $AccessToken\" -H \"Content-Type: application/json\" -d \"{     \\\"to\\\":\\\"$Dest\\\",     \\\"body\\\":\\\"Test Message\\\",     \\\"from\\\": \\\"+61412345678\\\",     \\\"validity\\\": 5,     \\\"scheduledDelivery\\\": 1,     \\\"notifyURL\\\": \\\"\\\",     \\\"replyRequest\\\": false     \\\"priority\\\": true   }\" \"https://tapi.telstra.com/v2/messages/sms\" 
\\

Send message to multiple numbers:

 #!/bin/bash   # Use the Messaging API to send an SMS   AccessToken=\"Access Token\"   Dest=\"Destination number\"   curl -X post -H \"Authorization: Bearer $AccessToken\" \\     -H \"Content-Type: application/json\" \\     -d '{ \"to\":\"$dest1, $dest2, $dest3\", \"body\":\"Test Message\" }' \\     https://tapi.telstra.com/v2/messages/sms   

+Send an SMS Message to a single or multiple mobile number/s. 
 
 ### Example
 ```python
@@ -236,11 +289,13 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN'
 
 # create an instance of the API class
 api_instance = Telstra_Messaging.MessagingApi(Telstra_Messaging.ApiClient(configuration))
-payload = Telstra_Messaging.SendSMSRequest() # SendSMSRequest | A JSON or XML payload containing the recipient's phone number and text message.  This number can be in international format if preceeded by a ‘+’ or in national format ('04xxxxxxxx') where x is a digit.
+send_sms_request = Telstra_Messaging.SendSMSRequest() # SendSMSRequest | A JSON or XML payload containing the recipient's phone number and text message.
+This number can be in international format if preceeded by a ‘+’ or in national format ('04xxxxxxxx') where x is a digit.
+
 
 try:
     # Send SMS
-    api_response = api_instance.send_sms(payload)
+    api_response = api_instance.send_sms(send_sms_request)
     pprint(api_response)
 except ApiException as e:
     print("Exception when calling MessagingApi->send_sms: %s\n" % e)
@@ -250,7 +305,9 @@ except ApiException as e:
 
 Name | Type | Description  | Notes
 ------------- | ------------- | ------------- | -------------
- **payload** | [**SendSMSRequest**](SendSMSRequest.md)| A JSON or XML payload containing the recipient's phone number and text message.  This number can be in international format if preceeded by a ‘+’ or in national format ('04xxxxxxxx') where x is a digit. | 
+ **send_sms_request** | [**SendSMSRequest**](SendSMSRequest.md)| A JSON or XML payload containing the recipient's phone number and text message.
+This number can be in international format if preceeded by a ‘+’ or in national format ('04xxxxxxxx') where x is a digit.
+ | 
 
 ### Return type
 
diff --git a/docs/OAuthResponse.md b/docs/OAuthResponse.md
index 6399010..58dc142 100644
--- a/docs/OAuthResponse.md
+++ b/docs/OAuthResponse.md
@@ -5,7 +5,7 @@ Name | Type | Description | Notes
 ------------ | ------------- | ------------- | -------------
 **access_token** | **str** | OAuth access token | [optional] 
 **token_type** | **str** | OAuth token type | [optional] 
-**expires_in** | **str** | OAuth expity time | [optional] 
+**expires_in** | **str** | OAuth expiry time | [optional] 
 
 [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
 
diff --git a/docs/ProvisionNumberRequest.md b/docs/ProvisionNumberRequest.md
index 59c06b2..d094e39 100644
--- a/docs/ProvisionNumberRequest.md
+++ b/docs/ProvisionNumberRequest.md
@@ -3,9 +3,9 @@
 ## Properties
 Name | Type | Description | Notes
 ------------ | ------------- | ------------- | -------------
-**active_days** | **int** | The number of days before for which this number is provisioned. Usually this will be same as the plan you buy. | [optional] 
-**notify_url** | **str** | A callback URL that will be POSTed to whenever a new message arrives at this destination address. If this is not provided then you can make use the Get Replies API to poll for messages. | [optional] 
-**callback_data** | **str** | A JSON that will be sent as the body in the POST to the notifyURL. This can be any meaningful data relevant to your application. | [optional] 
+**active_days** | **int** | The number of days before for which this number is provisioned. Usually this will be same as the plan you buy.  | [optional] 
+**notify_url** | **str** | A notification URL that will be POSTed to whenever a new message (e.g. a reply to a message sent) arrives at this destination address.  If this is not provided then you can use the Get /sms or /mms API to poll for reply messages. *Please note that the notification URLs and the Get /sms or /mms call are exclusive. If a notification URL has been set then the GET call will not provide any useful information.*  | [optional] 
+**callback_data** | **str** | A JSON that will be sent as the body in the POST to the notifyURL. This can be any meaningful data relevant to your application.  | [optional] 
 
 [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
 
diff --git a/docs/ProvisioningApi.md b/docs/ProvisioningApi.md
index f546f92..a5f2428 100644
--- a/docs/ProvisioningApi.md
+++ b/docs/ProvisioningApi.md
@@ -10,11 +10,11 @@ Method | HTTP request | Description
 
 
 # **create_subscription**
-> ProvisionNumberResponse create_subscription(body)
+> ProvisionNumberResponse create_subscription(provision_number_request)
 
 Create Subscription
 
-Invoke the provisioning API to get a dedicated mobile number for an account or application.  
   #!/bin/bash   curl -X POST \\   https://tapi.telstra.com/v2/messages/provisioning/subscriptions \\   -H 'authorization: Bearer $ACCESS_TOKEN' \\   -H 'cache-control: no-cache' \\   -H 'content-type: application/json' \\   -d '{   \"activeDays\":30,   \"notifyURL\":\"http://example.com/callback\",   \"callbackData\":     {       \"anything\":\"some data\"     }   }' 
+Invoke the provisioning API to get a dedicated mobile number for an account or application. ### Example ```python @@ -30,11 +30,11 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class api_instance = Telstra_Messaging.ProvisioningApi(Telstra_Messaging.ApiClient(configuration)) -body = Telstra_Messaging.ProvisionNumberRequest() # ProvisionNumberRequest | A JSON payload containing the required attributes +provision_number_request = Telstra_Messaging.ProvisionNumberRequest() # ProvisionNumberRequest | A JSON payload containing the required attributes try: # Create Subscription - api_response = api_instance.create_subscription(body) + api_response = api_instance.create_subscription(provision_number_request) pprint(api_response) except ApiException as e: print("Exception when calling ProvisioningApi->create_subscription: %s\n" % e) @@ -44,7 +44,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**ProvisionNumberRequest**](ProvisionNumberRequest.md)| A JSON payload containing the required attributes | + **provision_number_request** | [**ProvisionNumberRequest**](ProvisionNumberRequest.md)| A JSON payload containing the required attributes | ### Return type @@ -62,11 +62,11 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **delete_subscription** -> delete_subscription(body) +> delete_subscription(delete_number_request) Delete Subscription -Delete a mobile number subscription from an account +Delete a mobile number subscription from an account ### Example ```python @@ -82,11 +82,11 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class api_instance = Telstra_Messaging.ProvisioningApi(Telstra_Messaging.ApiClient(configuration)) -body = Telstra_Messaging.DeleteNumberRequest() # DeleteNumberRequest | EmptyArr +delete_number_request = Telstra_Messaging.DeleteNumberRequest() # DeleteNumberRequest | EmptyArr try: # Delete Subscription - api_instance.delete_subscription(body) + api_instance.delete_subscription(delete_number_request) except ApiException as e: print("Exception when calling ProvisioningApi->delete_subscription: %s\n" % e) ``` @@ -95,7 +95,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**DeleteNumberRequest**](DeleteNumberRequest.md)| EmptyArr | + **delete_number_request** | [**DeleteNumberRequest**](DeleteNumberRequest.md)| EmptyArr | ### Return type @@ -108,7 +108,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/json + - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -117,7 +117,7 @@ void (empty response body) Get Subscription -Get mobile number subscription for an account +Get mobile number subscription for an account ### Example ```python @@ -155,7 +155,7 @@ This endpoint does not need any parameter. ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/SendMmsRequest.md b/docs/SendMmsRequest.md index 3cd5ca9..3a428e7 100644 --- a/docs/SendMmsRequest.md +++ b/docs/SendMmsRequest.md @@ -3,12 +3,12 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**_from** | **str** | This will be the source address that will be displayed on the receiving device. If it is not present then it will default to the MSISDN assigned to the app. If replyRequest is set to true, then this field will be ignored. | -**to** | **str** | This is the destination address. | +**_from** | **str** | This will be the source address that will be displayed on the receiving device. If it is not present then it will default to the MSISDN assigned to the app. If replyRequest is set to true, then this field will be ignored. | +**to** | **str** | This is the destination address. Can be an array of strings if sending to multiple numbers: \"to\":[\"+61412345678\", \"+61418765432\"] | **subject** | **str** | The subject that will be used in an MMS message. | **reply_request** | **bool** | If set to true, the reply message functionality will be implemented and the to address will be ignored if present. | **notify_url** | **str** | Notify url | [optional] -**mms_content** | [**list[MMSContent]**](MMSContent.md) | An Array of content that will be sent in an MMS message. If this array is present it will cause the body element to be ignored, and the message will be sent as an MMS. | +**mms_content** | [**list[MMSContent]**](MMSContent.md) | An array of content that will be sent in an MMS message. If this array is present it will cause the `body` element to be ignored, and the message will be sent as an MMS. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SendSMSRequest.md b/docs/SendSMSRequest.md index 4c6945a..e6702ed 100644 --- a/docs/SendSMSRequest.md +++ b/docs/SendSMSRequest.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**to** | **str** | Phone number (in E.164 format) to send the SMS to. This number can be in international format `\"to\": \"+61412345678\"` or in national format. Can be an array of strings if sending to multiple numbers: `\"to\": \"+61412345678, +61418765432\"` | -**body** | **str** | The text body of the message. Messages longer than 160 characters will be counted as multiple messages. This field contains the message text, this can be up to 1900 (for a single recipient) or 500 (for multiple recipients) UTF-8 characters. As mobile devices rarely support the full range of UTF-8 characters, it is possible that some characters may not be translated correctly by the mobile device | +**to** | **str** | Phone number (in E.164 format) to send the SMS to. This number can be in international format `\"to\": \"+61412345678\"` or in national format. Can be an array of strings if sending to multiple numbers: `\"to\":[\"+61412345678\", \"+61418765432\"]` | +**body** | **str** | The text body of the message. Messages longer than 160 characters will be counted as multiple messages. This field contains the message text, this can be up to 1900 (for a single recipient) or 500 (for multiple recipients) UTF-8 characters. As mobile devices rarely support the full range of UTF-8 characters, it is possible that some characters may not be translated correctly by the mobile device | **_from** | **str** | The Alphanumeric sender ID of up to 11 characters or phone number the SMS was sent from. If not present, the service will use the mobile number associated with the application (in E.164 format). This feature is only available on paid plans. | [optional] **validity** | **int** | How long the platform should attempt to deliver the message for. This period is specified in minutes from the message. Normally if the message cannot be delivered immediately, it will be stored and delivery will be periodically reattempted. The network will attempt to send the message for up to seven days. It is possible to define a period smaller than 7 days by including this parameter and specifying the number of minutes that delivery should be attempted. eg: including `\"validity\": 60` will specify that if a message can't be delivered within the first 60 minutes them the network should stop. | [optional] **scheduled_delivery** | **int** | How long the platform should wait before attempting to send the message - specified in minutes. e.g.: If `\"scheduledDelivery\": 120` is included, then the network will not attempt to start message delivery for two hours after the message has been submitted | [optional] diff --git a/setup.py b/setup.py index 072fd03..608295f 100644 --- a/setup.py +++ b/setup.py @@ -3,18 +3,17 @@ """ Telstra Messaging API - # Introduction Send and receive SMS and MMS messages globally using Telstra’s enterprise grade Messaging API. It also allows your application to track the delivery status of both sent and received messages. Get your dedicated Australian number, and start sending and receiving messages today. # Features

The Telstra Messaging API provides the features below.
Feature Description
Dedicated Number Provision a mobile number for your account to be used as from address in the API
Send Messages Sending SMS or MMS messages
Receive Messages Telstra will deliver messages sent to a dedicated number or to the notifyURL defined by you
Broadcast Messages Invoke a single API to send a message to a list of number provided in to
Delivery Status Query the delivery status of your messages
Callbacks Provide a notification URL and Telstra will notify your app when messages status changes
Alphanumeric Identifier Differentiate yourself by providing an alphanumeric string in from. This feature is only available on paid plans
Concatenation Send messages up to 1900 characters long and Telstra will automaticaly segment and reassemble them
Reply Request Create a chat session by associating messageId and to number to track responses received from a mobile number. We will store this association for 8 days
Character set Accepts all Unicode characters as part of UTF-8
Bounce-back response See if your SMS hits an unreachable or unallocated number (Australia Only)
Queuing Messaging API will automatically queue and deliver each message at a compliant rate.
Emoji Encoding The API supports the encoding of the full range of emojis. Emojis in the reply messages will be in their UTF-8 format.
# Getting Access to the API

  1. Register at https://dev.telstra.com.
  2. After registration, login to https://dev.telstra.com and navigate to the "My apps" page.
  3. Create your application by clicking the "Add new app" button
  4. Select "API Free Trial" Product when configuring your application. This Product includes the Telstra Messaging API as well as other APIs. Your application will be approved automatically.
  5. There is a maximum of 1000 free messages per developer. Additional messages and features can be purchased from https://dev.telstra.com.
  6. Note your Client key and Client secret as these will be needed to provision a number for your application and for authentication.

Now head over to Getting Started where you can find a postman collection as well as some links to sample apps and SDKs to get you started.

Happy Messaging! # Getting Started

Below are the steps to get started with the Telstra Messaging API.

  1. Generate OAuth2 Token using your Client key and Client secret.
  2. Create Subscription in order to receive a provisioned number.
  3. Send Message to a specific mobile number.

Run in Postman

\"Run

Sample Apps

- Perl Sample App - Happy Chat App - PHP Sample App

SDK repos

- Messaging API - PHP SDK - Messaging API - Python SDK - Messaging API - Ruby SDK - Messaging API - NodeJS SDK - Messaging API - .Net2 SDK - Messaging API - Java SDK # Delivery Notification The API provides several methods for notifying when a message has been delivered to the destination.
  1. When you provision a number there is an opportunity to specify a notifyURL, when the message has been delivered the API will make a call to this URL to advise of the message status. If this is not provided then you can make use the Get Replies API to poll for messages.
  2. If you do not specify a URL you can always call the GET /sms API get the latest replies to the message.
Please note that the notification URLs and the polling call are exclusive. If a notification URL has been set then the polling call will not provide any useful information.

Notification URL Format

When a message has reached its final state, the API will send a POST to the URL that has been previously specified.

Notification URL Format for SMS

{     to: '+61418123456'     sentTimestamp: '2017-03-17T10:05:22+10:00'     receivedTimestamp: '2017-03-17T10:05:23+10:00'     messageId: /cccb284200035236000000000ee9d074019e0301/1261418123456     deliveryStatus: DELIVRD   } 
\\ The fields are:
Field Description
to The number the message was sent to.
receivedTimestamp Time the message was sent to the API.
sentTimestamp Time handling of the message ended.
deliveryStatus The final state of the message.
messageId The same reference that was returned when the original message was sent.
receivedTimestamp Time the message was sent to the API.
Upon receiving this call it is expected that your servers will give a 204 (No Content) response. Anything else will cause the API to reattempt the call 5 minutes later.

Notification URL Format for SMS Replies

{     \"status\": \"RECEIVED\"     \"destinationAddress\": \"+61418123456\"     \"senderAddress\": \"+61421987654\"     \"message\": \"Foo\"             \"sentTimestamp\": \"2018-03-23T12:10:06+10:00\"   }                              
\\ The fields are:
Field Description
status The final state of the message.
destinationAddress The number the message was sent to.
senderAddress The number the message was sent from.
message The sontent of the SMS reply.
sentTimestamp Time handling of the message ended.

Notification URL Format for MMS Replies

{     \"status\": \"RECEIVED\",     \"destinationAddress\": \"+61418123456\",     \"senderAddress\": \"+61421987654\",     \"subject\": \"Foo\",     \"sentTimestamp\": \"2018-03-23T12:15:45+10:00\",     \"envelope\": \"string\",     \"MMSContent\":      [       {         \"type\": \"application/smil\",         \"filename\": \"smil.xml\",         \"payload\": \"string\"       },        {         \"type\": \"image/jpeg\",         \"filename\": \"sample.jpeg\",         \"payload\": \"string\"        }      ]    } 
\\ The fields are:
Field Description
status The final state of the message.
destinationAddress The number the message was sent to.
senderAddress The number the message was sent from.
subject The subject assigned to the message.
sentTimestamp Time handling of the message ended.
envelope Information about about terminal type and originating operator.
MMSContent An array of the actual content of the reply message.
type The content type of the message.
filename The filename for the message content.
payload The content of the message.
# Frequently Asked Questions **Q: Can I send a broadcast message using the Telstra Messging API?** A. Yes. Recipient numbers can be in teh form of an array of strings if a broadcast message needs to be sent.

Notes

View messaging in Swagger UI # noqa: E501 + # Introduction Send and receive SMS and MMS messages globally using Telstra’s enterprise grade Messaging API. It also allows your application to track the delivery status of both sent and received messages. Get your dedicated Australian number, and start sending and receiving messages today. # Features The Telstra Messaging API provides the features below. | Feature | Description | | --- | --- | | `Dedicated Number` | Provision a mobile number for your account to be used as `from` address in the API | | `Send Messages` | Sending SMS or MMS messages | | `Receive Messages` | Telstra will deliver messages sent to a dedicated number or to the `notifyURL` defined by you | | `Broadcast Messages` | Invoke a single API call to send a message to a list of numbers provided in `to` | | `Delivery Status` | Query the delivery status of your messages | | `Callbacks` | Provide a notification URL and Telstra will notify your app when a message status changes | | `Alphanumeric Identifier` | Differentiate yourself by providing an alphanumeric string in `from`. This feature is only available on paid plans | | `Concatenation` | Send messages up to 1900 characters long and Telstra will automaticaly segment and reassemble them | | `Reply Request` | Create a chat session by associating `messageId` and `to` number to track responses received from a mobile number. We will store this association for 8 days | | `Character set` | Accepts all Unicode characters as part of UTF-8 | | `Bounce-back response` | See if your SMS hits an unreachable or unallocated number (Australia Only) | | `Queuing` | Messaging API will automatically queue and deliver each message at a compliant rate. | | `Emoji Encoding` | The API supports the encoding of the full range of emojis. Emojis in the reply messages will be in their UTF-8 format. | ## Delivery Notification or Callbacks The API provides several methods for notifying when a message has been delivered to the destination. 1. When you send a message there is an opportunity to specify a `notifyURL`. Once the message has been delivered the API will make a call to this URL to advise of the message status. 2. If you do not specify a URL you can always call the `GET /status` API to get the status of the message. # Getting Access to the API 1. Register at [https://dev.telstra.com](https://dev.telstra.com). 2. After registration, login to [https://dev.telstra.com](https://dev.telstra.com) and navigate to the **My apps** page. 3. Create your application by clicking the **Add new app** button 4. Select **API Free Trial** Product when configuring your application. This Product includes the Telstra Messaging API as well as other free trial APIs. Your application will be approved automatically. 5. There is a maximum of 1000 free messages per developer. Additional messages and features can be purchased from [https://dev.telstra.com](https://dev.telstra.com). 6. Note your `Client key` and `Client secret` as these will be needed to provision a number for your application and for authentication. Now head over to **Getting Started** where you can find a postman collection as well as some links to sample apps and SDKs to get you started. Happy Messaging! # Frequently Asked Questions **Q: Is creating a subscription via the Provisioning call a required step?** A. Yes. You will only be able to start sending messages if you have a provisioned dedicated number. Use Provisioning to create a dedicated number subscription, or renew your dedicated number if it has expired. **Q: When trying to send an SMS I receive a `400 Bad Request` response. How can I fix this?** A. You need to make sure you have a provisioned dedicated number before you can send an SMS. If you do not have a provisioned dedicated number and you try to send a message via the API, you will get the error below in the response:
{   \"status\":\"400\",   \"code\":\"DELIVERY-IMPOSSIBLE\",   \"message\":\"Invalid \\'from\\' address specified\" }
Use Provisioning to create a dedicated number subscription, or renew your dedicated number if it has expired. **Q: Can I send a broadcast message using the Telstra Messaging API?** A. Yes. Recipient numbers can be in the form of an array of strings if a broadcast message needs to be sent, allowing you to send to multiple mobile numbers in one API call. A sample request body for this will be: `{\"to\":[\"+61412345678\",\"+61487654321\"],\"body\":\"Test Message\"}` **Q: Can I use `Alphanumeric Identifier` from my paid plan via credit card?** A. `Alphanumeric Identifier` is only available on Telstra Account paid plans, not through credit card paid plans. **Q: How long does my dedicated number stay active for?** A. When you provision a dedicated number, by default it will be active for 30-days. You can use the `activeDays` parameter during the provisioning call to increment or decrement the number of days your dedicated number will remain active. **Q: What is the maximum sized MMS that I can send?** A. This will depend on the carrier that will receive the MMS. For Telstra it's up to 2MB, Optus up to 1.5MB and Vodafone only allows up to 500kB. You will need to check with international carriers for thier MMS size limits. **Q: Are SMILs supported by the Messaging API?** A. While there will be no error if you send an MMS with a SMIL presentation, the actual layout or sequence defined in the SMIL may not display as expected because most of the new smartphone devices ignore the SMIL presentation layer. SMIL was used in feature phones which had limited capability and SMIL allowed a *powerpoint type* presentation to be provided. Smartphones now have the capability to display video which is the better option for presentations. It is recommended that MMS messages should just drop the SMIL. **Q: How do I assign a delivery notification or callback URL?** A. You can assign a delivery notification or callback URL by adding the `notifyURL` parameter in the body of the request when you send a message. Once the message has been delivered, a notification will then be posted to this callback URL. **Q: What is the difference between the `notifyURL` parameter in the Provisoning call versus the `notifyURL` parameter in the Send Message call?** A. The `notifyURL` in the Provisoning call will be the URL where replies to the provisioned number will be posted. On the other hand, the `notifyURL` in the Send Message call will be the URL where the delivery notification will be posted, e.g. when an SMS has already been delivered to the recipient. # Getting Started Below are the steps to get started with the Telstra Messaging API. 1. Generate an OAuth2 token using your `Client key` and `Client secret`. 2. Use the Provisioning call to create a subscription and receive a dedicated number. 3. Send a message to a specific mobile number. ## Run in Postman \"Run ## Sample Apps - [Perl Sample App](https://github.com/telstra/MessagingAPI-perl-sample-app) - [Happy Chat App](https://github.com/telstra/messaging-sample-code-happy-chat) - [PHP Sample App](https://github.com/developersteve/telstra-messaging-php) ## SDK Repos - [Messaging API - PHP SDK](https://github.com/telstra/MessagingAPI-SDK-php) - [Messaging API - Python SDK](https://github.com/telstra/MessagingAPI-SDK-python) - [Messaging API - Ruby SDK](https://github.com/telstra/MessagingAPI-SDK-ruby) - [Messaging API - NodeJS SDK](https://github.com/telstra/MessagingAPI-SDK-node) - [Messaging API - .Net2 SDK](https://github.com/telstra/MessagingAPI-SDK-dotnet) - [Messaging API - Java SDK](https://github.com/telstra/MessagingAPI-SDK-Java) ## Blog Posts For more information on the Messaging API, you can read these blog posts: - [Callbacks Part 1](https://dev.telstra.com/content/understanding-messaging-api-callbacks-part-1) - [Callbacks Part 2](https://dev.telstra.com/content/understanding-messaging-api-callbacks-part-2) # noqa: E501 OpenAPI spec version: 2.2.6 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ from setuptools import setup, find_packages # noqa: H301 NAME = "Telstra_Messaging" -VERSION = "1.0.4" +VERSION = "1.0.4.1" # To install the library, run the following # # python setup.py install @@ -30,11 +29,11 @@ description="Telstra Messaging API", author_email="", url="https://github.com/telstra/Messaging-SDK-python", - keywords=["Swagger", "Telstra Messaging API"], + keywords=["OpenAPI", "OpenAPI-Generator", "Telstra Messaging API"], install_requires=REQUIRES, packages=find_packages(), include_package_data=True, long_description="""\ - # Introduction Send and receive SMS and MMS messages globally using Telstra’s enterprise grade Messaging API. It also allows your application to track the delivery status of both sent and received messages. Get your dedicated Australian number, and start sending and receiving messages today. # Features <p>The Telstra Messaging API provides the features below. <table> <thead> <tr> <th>Feature</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>Dedicated Number</code></td> <td>Provision a mobile number for your account to be used as from address in the API</td> </tr> <tr> <td><code>Send Messages</code></td> <td>Sending SMS or MMS messages</td> </tr> <tr> <td><code>Receive Messages</code></td> <td>Telstra will deliver messages sent to a dedicated number or to the <code>notifyURL</code> defined by you</td> </tr> <tr> <td><code>Broadcast Messages</code></td> <td>Invoke a single API to send a message to a list of number provided in <code>to</code></td> </tr> <tr> <td><code>Delivery Status</code></td> <td>Query the delivery status of your messages</td> </tr> <tr> <td><code>Callbacks</code></td> <td>Provide a notification URL and Telstra will notify your app when messages status changes</td> </tr> <tr> <td><code>Alphanumeric Identifier</code></td> <td>Differentiate yourself by providing an alphanumeric string in <code>from</code>. This feature is only available on paid plans</td> </tr> <tr> <td><code>Concatenation</code></td> <td>Send messages up to 1900 characters long and Telstra will automaticaly segment and reassemble them</td> </tr> <tr> <td><code>Reply Request</code></td> <td>Create a chat session by associating <code>messageId</code> and <code>to</code> number to track responses received from a mobile number. We will store this association for 8 days</td> </tr> <tr> <td><code>Character set</code></td> <td>Accepts all Unicode characters as part of UTF-8</td> </tr> <tr> <td><code>Bounce-back response</code></td> <td>See if your SMS hits an unreachable or unallocated number (Australia Only)</td> </tr> <tr> <td><code>Queuing</code></td> <td>Messaging API will automatically queue and deliver each message at a compliant rate.</td> </tr> <tr> <td><code>Emoji Encoding</code></td> <td>The API supports the encoding of the full range of emojis. Emojis in the reply messages will be in their UTF-8 format.</td> </tr> </tbody> </table> # Getting Access to the API <ol> <li>Register at <a href=\"https://dev.telstra.com\">https://dev.telstra.com</a>. <li>After registration, login to <a href=\"https://dev.telstra.com\">https://dev.telstra.com</a> and navigate to the &quot;My apps&quot; page. <li>Create your application by clicking the &quot;Add new app&quot; button <li>Select &quot;API Free Trial&quot; Product when configuring your application. This Product includes the Telstra Messaging API as well as other APIs. Your application will be approved automatically. <li>There is a maximum of 1000 free messages per developer. Additional messages and features can be purchased from <a href=\"https://dev.telstra.com\">https://dev.telstra.com</a>. <li>Note your <code>Client key</code> and <code>Client secret</code> as these will be needed to provision a number for your application and for authentication. </ol> <p>Now head over to <b>Getting Started</b> where you can find a postman collection as well as some links to sample apps and SDKs to get you started. <p>Happy Messaging! # Getting Started <p>Below are the steps to get started with the Telstra Messaging API.</p> <ol> <li>Generate OAuth2 Token using your <code>Client key</code> and <code>Client secret</code>.</li> <li>Create Subscription in order to receive a provisioned number.</li> <li>Send Message to a specific mobile number.</li> </ol> <h2>Run in Postman</h2> <p><a href=\"https://app.getpostman.com/run-collection/ded00578f69a9deba256#?env%5BMessaging%20API%20Environments%5D=W3siZW5hYmxlZCI6dHJ1ZSwia2V5IjoiY2xpZW50X2lkIiwidmFsdWUiOiIiLCJ0eXBlIjoidGV4dCJ9LHsiZW5hYmxlZCI6dHJ1ZSwia2V5IjoiY2xpZW50X3NlY3JldCIsInZhbHVlIjoiIiwidHlwZSI6InRleHQifSx7ImVuYWJsZWQiOnRydWUsImtleSI6ImFjY2Vzc190b2tlbiIsInZhbHVlIjoiIiwidHlwZSI6InRleHQifSx7ImVuYWJsZWQiOnRydWUsImtleSI6Imhvc3QiLCJ2YWx1ZSI6InRhcGkudGVsc3RyYS5jb20iLCJ0eXBlIjoidGV4dCJ9LHsiZW5hYmxlZCI6dHJ1ZSwia2V5IjoiQXV0aG9yaXphdGlvbiIsInZhbHVlIjoiIiwidHlwZSI6InRleHQifSx7ImVuYWJsZWQiOnRydWUsImtleSI6Im9hdXRoX2hvc3QiLCJ2YWx1ZSI6InNhcGkudGVsc3RyYS5jb20iLCJ0eXBlIjoidGV4dCJ9LHsiZW5hYmxlZCI6dHJ1ZSwia2V5IjoibWVzc2FnZV9pZCIsInZhbHVlIjoiIiwidHlwZSI6InRleHQifV0=\"> <img src=\"https://run.pstmn.io/button.svg\" alt=\"Run in Postman\" /></a></p> <h2>Sample Apps</h2> - <a href=\"https://github.com/telstra/MessagingAPI-perl-sample-app\">Perl Sample App</a> - <a href=\"https://github.com/telstra/messaging-sample-code-happy-chat\">Happy Chat App</a> - <a href=\"https://github.com/developersteve/telstra-messaging-php\">PHP Sample App</a> <h2>SDK repos</h2> - <a href=\"https://github.com/telstra/MessagingAPI-SDK-php\">Messaging API - PHP SDK</a> - <a href=\"https://github.com/telstra/MessagingAPI-SDK-python\">Messaging API - Python SDK</a> - <a href=\"https://github.com/telstra/MessagingAPI-SDK-ruby\">Messaging API - Ruby SDK</a> - <a href=\"https://github.com/telstra/MessagingAPI-SDK-node\">Messaging API - NodeJS SDK</a> - <a href=\"https://github.com/telstra/MessagingAPI-SDK-dotnet\">Messaging API - .Net2 SDK</a> - <a href=\"https://github.com/telstra/MessagingAPI-SDK-Java\">Messaging API - Java SDK</a> # Delivery Notification The API provides several methods for notifying when a message has been delivered to the destination. <ol> <li>When you provision a number there is an opportunity to specify a <code>notifyURL</code>, when the message has been delivered the API will make a call to this URL to advise of the message status. If this is not provided then you can make use the Get Replies API to poll for messages.</li> <li>If you do not specify a URL you can always call the <code>GET /sms</code> API get the latest replies to the message.</li> </ol> <I>Please note that the notification URLs and the polling call are exclusive. If a notification URL has been set then the polling call will not provide any useful information.</I> <h2>Notification URL Format</h2> When a message has reached its final state, the API will send a POST to the URL that has been previously specified. <h3>Notification URL Format for SMS</h3> <pre><code class=\"language-sh\">{ to: '+61418123456' sentTimestamp: '2017-03-17T10:05:22+10:00' receivedTimestamp: '2017-03-17T10:05:23+10:00' messageId: /cccb284200035236000000000ee9d074019e0301/1261418123456 deliveryStatus: DELIVRD } </code></pre> \\ The fields are: <table> <thead> <tr> <th>Field</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>to</code></td> <td>The number the message was sent to.</td> </tr> <tr> <td><code>receivedTimestamp</code></td> <td>Time the message was sent to the API.</td> </tr> <tr> <td><code>sentTimestamp</code></td> <td>Time handling of the message ended.</td> </tr> <tr> <td><code>deliveryStatus</code></td> <td>The final state of the message.</td> </tr> <tr> <td><code>messageId</code></td> <td>The same reference that was returned when the original message was sent.</td> </tr> <tr> <td><code>receivedTimestamp</code></td> <td>Time the message was sent to the API.</td> </tr> </tbody> </table> Upon receiving this call it is expected that your servers will give a 204 (No Content) response. Anything else will cause the API to reattempt the call 5 minutes later. <h3>Notification URL Format for SMS Replies</h3> <pre><code class=\"language-sh\">{ \"status\": \"RECEIVED\" \"destinationAddress\": \"+61418123456\" \"senderAddress\": \"+61421987654\" \"message\": \"Foo\" \"sentTimestamp\": \"2018-03-23T12:10:06+10:00\" } </code></pre> \\ The fields are: <table> <thead> <tr> <th>Field</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>status</code></td> <td>The final state of the message.</td> </tr> <tr> <td><code>destinationAddress</code></td> <td>The number the message was sent to.</td> </tr> <tr> <td><code>senderAddress</code></td> <td>The number the message was sent from.</td> </tr> <tr> <td><code>message</code></td> <td>The sontent of the SMS reply.</td> </tr> <tr> <td><code>sentTimestamp</code></td> <td>Time handling of the message ended.</td> </tr> </tbody> </table> <h3>Notification URL Format for MMS Replies</h3> <pre><code class=\"language-sh\">{ \"status\": \"RECEIVED\", \"destinationAddress\": \"+61418123456\", \"senderAddress\": \"+61421987654\", \"subject\": \"Foo\", \"sentTimestamp\": \"2018-03-23T12:15:45+10:00\", \"envelope\": \"string\", \"MMSContent\": [ { \"type\": \"application/smil\", \"filename\": \"smil.xml\", \"payload\": \"string\" }, { \"type\": \"image/jpeg\", \"filename\": \"sample.jpeg\", \"payload\": \"string\" } ] } </code></pre> \\ The fields are: <table> <thead> <tr> <th>Field</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>status</code></td> <td>The final state of the message.</td> </tr> <tr> <td><code>destinationAddress</code></td> <td>The number the message was sent to.</td> </tr> <tr> <td><code>senderAddress</code></td> <td>The number the message was sent from.</td> </tr> <tr> <td><code>subject</code></td> <td>The subject assigned to the message.</td> </tr> <tr> <td><code>sentTimestamp</code></td> <td>Time handling of the message ended.</td> </tr> <tr> <td><code>envelope</code></td> <td>Information about about terminal type and originating operator.</td> </tr> <tr> <td><code>MMSContent</code></td> <td>An array of the actual content of the reply message.</td> </tr> <tr> <td><code>type</code></td> <td>The content type of the message.</td> </tr> <tr> <td><code>filename</code></td> <td>The filename for the message content.</td> </tr> <tr> <td><code>payload</code></td> <td>The content of the message.</td> </tr> </tbody> </table> # Frequently Asked Questions **Q: Can I send a broadcast message using the Telstra Messging API?** A. Yes. Recipient numbers can be in teh form of an array of strings if a broadcast message needs to be sent. <h2>Notes</h2> <a href=\"http://petstore.swagger.io/?url=https://raw.githubusercontent.com/telstra/MessagingAPI-v2/master/docs/swagger/messaging-api-swagger.yaml\" target=\"_blank\">View messaging in Swagger UI</a> # noqa: E501 + # Introduction Send and receive SMS and MMS messages globally using Telstra’s enterprise grade Messaging API. It also allows your application to track the delivery status of both sent and received messages. Get your dedicated Australian number, and start sending and receiving messages today. # Features The Telstra Messaging API provides the features below. | Feature | Description | | --- | --- | | `Dedicated Number` | Provision a mobile number for your account to be used as `from` address in the API | | `Send Messages` | Sending SMS or MMS messages | | `Receive Messages` | Telstra will deliver messages sent to a dedicated number or to the `notifyURL` defined by you | | `Broadcast Messages` | Invoke a single API call to send a message to a list of numbers provided in `to` | | `Delivery Status` | Query the delivery status of your messages | | `Callbacks` | Provide a notification URL and Telstra will notify your app when a message status changes | | `Alphanumeric Identifier` | Differentiate yourself by providing an alphanumeric string in `from`. This feature is only available on paid plans | | `Concatenation` | Send messages up to 1900 characters long and Telstra will automaticaly segment and reassemble them | | `Reply Request` | Create a chat session by associating `messageId` and `to` number to track responses received from a mobile number. We will store this association for 8 days | | `Character set` | Accepts all Unicode characters as part of UTF-8 | | `Bounce-back response` | See if your SMS hits an unreachable or unallocated number (Australia Only) | | `Queuing` | Messaging API will automatically queue and deliver each message at a compliant rate. | | `Emoji Encoding` | The API supports the encoding of the full range of emojis. Emojis in the reply messages will be in their UTF-8 format. | ## Delivery Notification or Callbacks The API provides several methods for notifying when a message has been delivered to the destination. 1. When you send a message there is an opportunity to specify a `notifyURL`. Once the message has been delivered the API will make a call to this URL to advise of the message status. 2. If you do not specify a URL you can always call the `GET /status` API to get the status of the message. # Getting Access to the API 1. Register at [https://dev.telstra.com](https://dev.telstra.com). 2. After registration, login to [https://dev.telstra.com](https://dev.telstra.com) and navigate to the **My apps** page. 3. Create your application by clicking the **Add new app** button 4. Select **API Free Trial** Product when configuring your application. This Product includes the Telstra Messaging API as well as other free trial APIs. Your application will be approved automatically. 5. There is a maximum of 1000 free messages per developer. Additional messages and features can be purchased from [https://dev.telstra.com](https://dev.telstra.com). 6. Note your `Client key` and `Client secret` as these will be needed to provision a number for your application and for authentication. Now head over to **Getting Started** where you can find a postman collection as well as some links to sample apps and SDKs to get you started. Happy Messaging! # Frequently Asked Questions **Q: Is creating a subscription via the Provisioning call a required step?** A. Yes. You will only be able to start sending messages if you have a provisioned dedicated number. Use Provisioning to create a dedicated number subscription, or renew your dedicated number if it has expired. **Q: When trying to send an SMS I receive a `400 Bad Request` response. How can I fix this?** A. You need to make sure you have a provisioned dedicated number before you can send an SMS. If you do not have a provisioned dedicated number and you try to send a message via the API, you will get the error below in the response: <pre><code class=\"language-sh\">{ \"status\":\"400\", \"code\":\"DELIVERY-IMPOSSIBLE\", \"message\":\"Invalid \\'from\\' address specified\" }</code></pre> Use Provisioning to create a dedicated number subscription, or renew your dedicated number if it has expired. **Q: Can I send a broadcast message using the Telstra Messaging API?** A. Yes. Recipient numbers can be in the form of an array of strings if a broadcast message needs to be sent, allowing you to send to multiple mobile numbers in one API call. A sample request body for this will be: `{\"to\":[\"+61412345678\",\"+61487654321\"],\"body\":\"Test Message\"}` **Q: Can I use `Alphanumeric Identifier` from my paid plan via credit card?** A. `Alphanumeric Identifier` is only available on Telstra Account paid plans, not through credit card paid plans. **Q: How long does my dedicated number stay active for?** A. When you provision a dedicated number, by default it will be active for 30-days. You can use the `activeDays` parameter during the provisioning call to increment or decrement the number of days your dedicated number will remain active. **Q: What is the maximum sized MMS that I can send?** A. This will depend on the carrier that will receive the MMS. For Telstra it's up to 2MB, Optus up to 1.5MB and Vodafone only allows up to 500kB. You will need to check with international carriers for thier MMS size limits. **Q: Are SMILs supported by the Messaging API?** A. While there will be no error if you send an MMS with a SMIL presentation, the actual layout or sequence defined in the SMIL may not display as expected because most of the new smartphone devices ignore the SMIL presentation layer. SMIL was used in feature phones which had limited capability and SMIL allowed a *powerpoint type* presentation to be provided. Smartphones now have the capability to display video which is the better option for presentations. It is recommended that MMS messages should just drop the SMIL. **Q: How do I assign a delivery notification or callback URL?** A. You can assign a delivery notification or callback URL by adding the `notifyURL` parameter in the body of the request when you send a message. Once the message has been delivered, a notification will then be posted to this callback URL. **Q: What is the difference between the `notifyURL` parameter in the Provisoning call versus the `notifyURL` parameter in the Send Message call?** A. The `notifyURL` in the Provisoning call will be the URL where replies to the provisioned number will be posted. On the other hand, the `notifyURL` in the Send Message call will be the URL where the delivery notification will be posted, e.g. when an SMS has already been delivered to the recipient. # Getting Started Below are the steps to get started with the Telstra Messaging API. 1. Generate an OAuth2 token using your `Client key` and `Client secret`. 2. Use the Provisioning call to create a subscription and receive a dedicated number. 3. Send a message to a specific mobile number. ## Run in Postman <a href=\"https://app.getpostman.com/run-collection/ded00578f69a9deba256#?env%5BMessaging%20API%20Environments%5D=W3siZW5hYmxlZCI6dHJ1ZSwia2V5IjoiY2xpZW50X2lkIiwidmFsdWUiOiIiLCJ0eXBlIjoidGV4dCJ9LHsiZW5hYmxlZCI6dHJ1ZSwia2V5IjoiY2xpZW50X3NlY3JldCIsInZhbHVlIjoiIiwidHlwZSI6InRleHQifSx7ImVuYWJsZWQiOnRydWUsImtleSI6ImFjY2Vzc190b2tlbiIsInZhbHVlIjoiIiwidHlwZSI6InRleHQifSx7ImVuYWJsZWQiOnRydWUsImtleSI6Imhvc3QiLCJ2YWx1ZSI6InRhcGkudGVsc3RyYS5jb20iLCJ0eXBlIjoidGV4dCJ9LHsiZW5hYmxlZCI6dHJ1ZSwia2V5IjoiQXV0aG9yaXphdGlvbiIsInZhbHVlIjoiIiwidHlwZSI6InRleHQifSx7ImVuYWJsZWQiOnRydWUsImtleSI6Im9hdXRoX2hvc3QiLCJ2YWx1ZSI6InNhcGkudGVsc3RyYS5jb20iLCJ0eXBlIjoidGV4dCJ9LHsiZW5hYmxlZCI6dHJ1ZSwia2V5IjoibWVzc2FnZV9pZCIsInZhbHVlIjoiIiwidHlwZSI6InRleHQifV0=\"><img src=\"https://run.pstmn.io/button.svg\" alt=\"Run in Postman\"/></a> ## Sample Apps - [Perl Sample App](https://github.com/telstra/MessagingAPI-perl-sample-app) - [Happy Chat App](https://github.com/telstra/messaging-sample-code-happy-chat) - [PHP Sample App](https://github.com/developersteve/telstra-messaging-php) ## SDK Repos - [Messaging API - PHP SDK](https://github.com/telstra/MessagingAPI-SDK-php) - [Messaging API - Python SDK](https://github.com/telstra/MessagingAPI-SDK-python) - [Messaging API - Ruby SDK](https://github.com/telstra/MessagingAPI-SDK-ruby) - [Messaging API - NodeJS SDK](https://github.com/telstra/MessagingAPI-SDK-node) - [Messaging API - .Net2 SDK](https://github.com/telstra/MessagingAPI-SDK-dotnet) - [Messaging API - Java SDK](https://github.com/telstra/MessagingAPI-SDK-Java) ## Blog Posts For more information on the Messaging API, you can read these blog posts: - [Callbacks Part 1](https://dev.telstra.com/content/understanding-messaging-api-callbacks-part-1) - [Callbacks Part 2](https://dev.telstra.com/content/understanding-messaging-api-callbacks-part-2) # noqa: E501 """ ) diff --git a/tox.ini b/tox.ini index 1cf0829..3d0be61 100644 --- a/tox.ini +++ b/tox.ini @@ -4,7 +4,7 @@ envlist = py27, py3 [testenv] deps=-r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt - + commands= nosetests \ - [] \ No newline at end of file + []