diff --git a/README.md b/README.md index f2bf58f..773d44e 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,9 @@ # Telstra_Messaging TelstraMessaging - JavaScript client for Telstra_Messaging - The Telstra SMS Messaging API allows your applications to send and receive SMS text messages from Australia's leading network operator. It also allows your application to track the delivery status of both sent and received SMS messages. -- API version: 2.2.4 -- Package version: 1.0.2 +- API version: 2.2.6 +- Package version: 1.0.4 ## Installation @@ -118,7 +117,7 @@ All URIs are relative to *https://tapi.telstra.com/v2* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*TelstraMessaging.AuthenticationApi* | [**authToken**](docs/AuthenticationApi.md#authToken) | **POST** /oauth/token | Generate authentication token +*TelstraMessaging.AuthenticationApi* | [**authToken**](docs/AuthenticationApi.md#authToken) | **POST** /oauth/token | Generate OAuth2 token *TelstraMessaging.MessagingApi* | [**getMMSStatus**](docs/MessagingApi.md#getMMSStatus) | **GET** /messages/mms/{messageid}/status | Get MMS Status *TelstraMessaging.MessagingApi* | [**getSMSStatus**](docs/MessagingApi.md#getSMSStatus) | **GET** /messages/sms/{messageId}/status | Get SMS Status *TelstraMessaging.MessagingApi* | [**retrieveSMSResponses**](docs/MessagingApi.md#retrieveSMSResponses) | **GET** /messages/sms | Retrieve SMS Responses @@ -132,15 +131,11 @@ Class | Method | HTTP request | Description ## Documentation for Models - [TelstraMessaging.DeleteNumberRequest](docs/DeleteNumberRequest.md) - - [TelstraMessaging.ErrorError](docs/ErrorError.md) - - [TelstraMessaging.ErrorErrorError](docs/ErrorErrorError.md) - [TelstraMessaging.GetSubscriptionResponse](docs/GetSubscriptionResponse.md) - [TelstraMessaging.InboundPollResponse](docs/InboundPollResponse.md) - [TelstraMessaging.MMSContent](docs/MMSContent.md) - [TelstraMessaging.Message](docs/Message.md) - [TelstraMessaging.MessageSentResponse](docs/MessageSentResponse.md) - - [TelstraMessaging.MessageType](docs/MessageType.md) - - [TelstraMessaging.OAuthRequest](docs/OAuthRequest.md) - [TelstraMessaging.OAuthResponse](docs/OAuthResponse.md) - [TelstraMessaging.OutboundPollResponse](docs/OutboundPollResponse.md) - [TelstraMessaging.ProvisionNumberRequest](docs/ProvisionNumberRequest.md) diff --git a/docs/AuthenticationApi.md b/docs/AuthenticationApi.md index b651297..00bac8d 100644 --- a/docs/AuthenticationApi.md +++ b/docs/AuthenticationApi.md @@ -4,16 +4,16 @@ All URIs are relative to *https://tapi.telstra.com/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**authToken**](AuthenticationApi.md#authToken) | **POST** /oauth/token | Generate authentication token +[**authToken**](AuthenticationApi.md#authToken) | **POST** /oauth/token | Generate OAuth2 token # **authToken** > OAuthResponse authToken(clientId, clientSecret, grantType) -Generate authentication token +Generate OAuth2 token -Generate authentication token +To generate an OAuth2 Authentication token, pass through your `Client key` and `Client secret` that you received when you registered for the &quot;API Free Trial&quot; Product. The grant_type should be left as `client_credentials` and the scope as `NSMS`. The token will expire in one hour. <pre><code class=\"language-sh\"> #!/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&amp;client_id=$CLIENT_KEY&amp;client_secret=CLIENT_SECRET&amp;scope=NSMS' \\ 'https://tapi.telstra.com/v2/oauth/token' </code></pre> ### Example ```javascript diff --git a/docs/Message.md b/docs/Message.md index dbac93d..6788e2b 100644 --- a/docs/Message.md +++ b/docs/Message.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**to** | **String** | | -**deliveryStatus** | **String** | | -**messageId** | **String** | | -**messageStatusURL** | **String** | | [optional] +**to** | **String** | Just a copy of the number the message is sent to. | +**deliveryStatus** | **String** | Gives an indication if the message has been accepted for delivery. The description field contains information on why a message may have been rejected. | +**messageId** | **String** | For an accepted message, ths will be a unique reference that can be used to check the messages status. Please refer to the Delivery Notification section. Note that `messageId` will be different for each number that the message was sent to. | +**messageStatusURL** | **String** | For an accepted message, ths will be the URL that can be used to check the messages status. Please refer to the Delivery Notification section. | [optional] diff --git a/docs/MessageSentResponse.md b/docs/MessageSentResponse.md index 11733d6..f53ecaf 100644 --- a/docs/MessageSentResponse.md +++ b/docs/MessageSentResponse.md @@ -3,10 +3,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**messages** | [**[Message]**](Message.md) | | -**messageType** | **String** | | -**numberSegments** | **Number** | | -**numberNationalDestinations** | **Number** | | [optional] -**numberInternationalDestinations** | **Number** | | [optional] +**messages** | [**[Message]**](Message.md) | An array of messages. | +**messageType** | **String** | This returns whether the message sent was a SMS or MMS. | +**numberSegments** | **Number** | For SMS messages only, the value indicates the number of 160 character message segments sent. | +**numberNationalDestinations** | **Number** | This returns the number of domestic Australian messages sent. | [optional] +**numberInternationalDestinations** | **Number** | This returns the number of international messages sent | [optional] diff --git a/docs/MessagingApi.md b/docs/MessagingApi.md index a0f1879..8840dc2 100644 --- a/docs/MessagingApi.md +++ b/docs/MessagingApi.md @@ -68,7 +68,7 @@ Name | Type | Description | Notes Get SMS Status -Get Message Status +If no notification URL has been specified, it is possible to poll for the message status. <pre><code class=\"language-sh\"> #!/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\" </code></pre> 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. ### Example ```javascript @@ -81,7 +81,7 @@ auth.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new TelstraMessaging.MessagingApi(); -var messageId = "messageId_example"; // String | Unique identifier of a message - it is the value returned from a previous POST call to https://api.telstra.com/v2/messages/sms +var messageId = "messageId_example"; // String | Unique identifier of a message - it is the value returned from a previous POST call to https://api.telstra.com/v2/messages/sms. var callback = function(error, data, response) { @@ -98,7 +98,7 @@ apiInstance.getSMSStatus(messageId, callback); Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **messageId** | **String**| Unique identifier of a message - it is the value returned from a previous POST call to https://api.telstra.com/v2/messages/sms | + **messageId** | **String**| 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 @@ -119,7 +119,7 @@ Name | Type | Description | Notes Retrieve SMS Responses -Retrieve Messages +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. ### Example ```javascript @@ -215,7 +215,7 @@ Name | Type | Description | Notes Send SMS -Send Message +Send an SMS Message to a single or multiple mobile number/s. <h3>Send message to a single number: </h3> <pre><code class=\"language-sh\"> #!/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\" </code></pre> \\ <h3>Send message to multiple numbers: </h3> <pre><code class=\"language-sh\"> #!/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 <pre><code class=\"language-sh\"> ### Example ```javascript @@ -228,7 +228,7 @@ auth.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new TelstraMessaging.MessagingApi(); -var payload = new TelstraMessaging.SendSMSRequest(); // SendSMSRequest | A JSON or XML payload containing the recipient's phone number and text message. The recipient number should be in the format '04xxxxxxxx' where x is a digit +var payload = new TelstraMessaging.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. var callback = function(error, data, response) { @@ -245,7 +245,7 @@ apiInstance.sendSMS(payload, callback); Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **payload** | [**SendSMSRequest**](SendSMSRequest.md)| A JSON or XML payload containing the recipient's phone number and text message. The recipient number should be in the format '04xxxxxxxx' where x is a digit | + **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. | ### Return type diff --git a/docs/OutboundPollResponse.md b/docs/OutboundPollResponse.md index ee61c5f..10c324a 100644 --- a/docs/OutboundPollResponse.md +++ b/docs/OutboundPollResponse.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **to** | **String** | The phone number (recipient) the message was sent to (in E.164 format). | [optional] -**receivedTimestamp** | **String** | The date and time when the message was recieved by recipient. | [optional] **sentTimestamp** | **String** | The date and time when the message was sent. | [optional] +**receivedTimestamp** | **String** | The date and time when the message was recieved by recipient. | [optional] **deliveryStatus** | [**Status**](Status.md) | | [optional] diff --git a/docs/ProvisionNumberRequest.md b/docs/ProvisionNumberRequest.md index 15c4a45..0cb1779 100644 --- a/docs/ProvisionNumberRequest.md +++ b/docs/ProvisionNumberRequest.md @@ -3,7 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**activeDays** | **Number** | Number of active days | [optional] -**notifyURL** | **String** | Notify url | [optional] +**activeDays** | **Number** | The number of days before for which this number is provisioned. Usually this will be same as the plan you buy. | [optional] +**notifyURL** | **String** | 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] +**callbackData** | **String** | 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] diff --git a/docs/ProvisioningApi.md b/docs/ProvisioningApi.md index 60fe707..585431a 100644 --- a/docs/ProvisioningApi.md +++ b/docs/ProvisioningApi.md @@ -15,7 +15,7 @@ Method | HTTP request | Description Create Subscription -Provision a mobile number +Invoke the provisioning API to get a dedicated mobile number for an account or application. <pre><code class=\"language-sh\"> #!/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\" } }' </code></pre> ### Example ```javascript diff --git a/docs/SendMmsRequest.md b/docs/SendMmsRequest.md index 8b3be12..90ac622 100644 --- a/docs/SendMmsRequest.md +++ b/docs/SendMmsRequest.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **to** | **String** | This is the destination address. | **subject** | **String** | The subject that will be used in an MMS message. | **replyRequest** | **Boolean** | If set to true, the reply message functionality will be implemented and the to address will be ignored if present. | -**mMSContent** | [**[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. | +**notifyURL** | **String** | Notify url | [optional] +**mMSContent** | [**[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. | diff --git a/docs/SendSMSRequest.md b/docs/SendSMSRequest.md index b13ccc2..6f17c3e 100644 --- a/docs/SendSMSRequest.md +++ b/docs/SendSMSRequest.md @@ -3,12 +3,13 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**to** | **String** | Phone number (in E.164 format) to send the SMS to. This number can be in international format if preceeded by a ‘+’, or in national format. | -**body** | **String** | The text body of the message. Messages longer than 160 characters will be counted as multiple messages. | -**from** | **String** | Phone number (in E.164 format) the SMS was sent from. If not present, the serverice will use the mobile number associated with the application, or it be an Alphanumeric address of up to 11 characters. | [optional] -**validity** | **Number** | How long the platform should attempt to deliver the message for. This period is specified in minutes from the message | [optional] -**scheduledDelivery** | **Number** | How long the platform should wait before attempting to send the message - specified in minutes. | [optional] -**notifyURL** | **String** | Contains a URL that will be called once your message has been processed. The status may be delivered, expired, deleted, etc. | [optional] -**replyRequest** | **Boolean** | If set to true, the reply message functionality will be implemented and the to address will be ignored if present. If false or not present, then normal message handling is implemented. | [optional] +**to** | **String** | 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** | **String** | 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** | **String** | 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** | **Number** | 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] +**scheduledDelivery** | **Number** | 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] +**notifyURL** | **String** | Contains a URL that will be called once your message has been processed. The status may be delivered, expired, deleted, etc. It is possible for the network to make a call to a URL when the message has been delivered (or has expired), different URLs can be set per message. Please refer to the Delivery Notification section. | [optional] +**replyRequest** | **Boolean** | If set to true, the reply message functionality will be implemented and the to address will be ignored if present. If false or not present, then normal message handling is implemented. When set to true, network will use a temporary number to deliver this message. All messages sent by mobile to this temporary number will be stored against the same `messageId`. If a `notifyURL` is provided then user response will be delivered to the URL where `messageId` will be same as `messageId` in reponse to original API request. This field contains the message text, this can be up to 500 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. | [optional] +**priority** | **Boolean** | When messages are queued up for a number, then it is possible to set where a new message will be placed in the queue. If the priority is set to true then the new message will be placed ahead of all messages with a normal priority. If there are no messages queued for the number, then this parameter has no effect. | [optional] diff --git a/package.json b/package.json index c017890..6c5ae1e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "Telstra_Messaging", - "version": "1.0.1", - "description": "The_Telstra_SMS_Messaging_API_allows_your_applications_to_send_and_receive_SMS_text_messages_from_Australias_leading_network_operator_It_also_allows_your_application_to_track_the_delivery_status_of_both_sent_and_received_SMS_messages_", + "version": "1.0.4", + "description": "_IntroductionSend_and_receive_SMS_and_MMS_messages_globally_using_Telstras_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__FeaturespThe_Telstra_Messaging_API_provides_the_features_below_table__thead____tr______thFeatureth______thDescriptionth____tr__thead__tbody____tr______tdcodeDedicated_Numbercodetd______tdProvision_a_mobile_number_for_your_account_to_be_used_as_from_address_in_the_APItd____tr____tr______tdcodeSend_Messagescodetd______tdSending_SMS_or_MMS_messagestd____tr____tr______tdcodeReceive_Messagescodetd______tdTelstra_will_deliver_messages_sent_to_a_dedicated_number_or_to_the_codenotifyURLcode_defined_by_youtd____tr____tr______tdcodeBroadcast_Messagescodetd______tdInvoke_a_single_API_to_send_a_message_to_a_list_of_number_provided_in_codetocodetd____tr____tr______tdcodeDelivery_Statuscodetd______tdQuery_the_delivery_status_of_your_messagestd____tr____tr______tdcodeCallbackscodetd______tdProvide_a_notification_URL_and_Telstra_will_notify_your_app_when_messages_status_changestd____tr____tr______tdcodeAlphanumeric_Identifiercodetd______tdDifferentiate_yourself_by_providing_an_alphanumeric_string_in_codefromcode__This_feature_is_only_available_on_paid_planstd____tr____tr______tdcodeConcatenationcodetd______tdSend_messages_up_to_1900_characters_long_and_Telstra_will_automaticaly_segment_and_reassemble_themtd____tr____tr______tdcodeReply_Requestcodetd______tdCreate_a_chat_session_by_associating_codemessageIdcode_and_codetocode_number_to_track_responses_received_from_a_mobile_number__We_will_store_this_association_for_8_daystd____tr____tr______tdcodeCharacter_setcodetd______tdAccepts_all_Unicode_characters_as_part_of_UTF_8td____tr____tr______tdcodeBounce_back_responsecodetd______tdSee_if_your_SMS_hits_an_unreachable_or_unallocated_number__Australia_Onlytd____tr____tr______tdcodeQueuingcodetd______tdMessaging_API_will_automatically_queue_and_deliver_each_message_at_a_compliant_rate_td____tr____tr______tdcodeEmoji_Encodingcodetd______tdThe_API_supports_the_encoding_of_the_full_range_of_emojis__Emojis_in_the_reply_messages_will_be_in_their_UTF_8_format_td____tr__tbodytable_Getting_Access_to_the_APIol__liRegister_at_a_hrefhttpsdev_telstra_comhttpsdev_telstra_coma___liAfter_registration_login_to_a_hrefhttpsdev_telstra_comhttpsdev_telstra_coma_______and_navigate_to_the_quotMy_appsquot_page____liCreate_your_application_by_clicking_the_quotAdd_new_appquot_button___liSelect_quotAPI_Free_Trialquot_Product_when_configuring_your_application__This_Product_includes_the_Telstra_Messaging_API_as_well_as_other_APIs__Your_application_will_be_approved_automatically___liThere_is_a_maximum_of_1000_free_messages_per_developer__Additional_messages_and_features_can_be_purchased_from_a_hrefhttpsdev_telstra_comhttpsdev_telstra_coma___liNote_your_codeClient_keycode_and_codeClient_secretcode_as_these_will_be_needed_to_provision_a_number_for_your_application_and_for_authentication_olpNow_head_over_to_bGetting_Startedb_where_you_can_find_a_postmancollection_as_well_as_some_links_to_sample_apps_and_SDKs_to_get_you_started_pHappy_Messaging_Getting_StartedpBelow_are_the_steps_to_get_started_with_the_Telstra_Messaging_API_p__ol____liGenerate_OAuth2_Token_using_your_codeClient_keycode_and_codeClient_secretcode_li____liCreate_Subscription_in_order_to_receive_a_provisioned_number_li____liSend_Message_to_a_specific_mobile_number_li__ol__h2Run_in_Postmanh2__pa__hrefhttpsapp_getpostman_comrun_collectionded00578f69a9deba256env5BMessaging20API20Environments5DW3siZW5hYmxlZCI6dHJ1ZSwia2V5IjoiY2xpZW50X2lkIiwidmFsdWUiOiIiLCJ0eXBlIjoidGV4dCJ9LHsiZW5hYmxlZCI6dHJ1ZSwia2V5IjoiY2xpZW50X3NlY3JldCIsInZhbHVlIjoiIiwidHlwZSI6InRleHQifSx7ImVuYWJsZWQiOnRydWUsImtleSI6ImFjY2Vzc190b2tlbiIsInZhbHVlIjoiIiwidHlwZSI6InRleHQifSx7ImVuYWJsZWQiOnRydWUsImtleSI6Imhvc3QiLCJ2YWx1ZSI6InRhcGkudGVsc3RyYS5jb20iLCJ0eXBlIjoidGV4dCJ9LHsiZW5hYmxlZCI6dHJ1ZSwia2V5IjoiQXV0aG9yaXphdGlvbiIsInZhbHVlIjoiIiwidHlwZSI6InRleHQifSx7ImVuYWJsZWQiOnRydWUsImtleSI6Im9hdXRoX2hvc3QiLCJ2YWx1ZSI6InNhcGkudGVsc3RyYS5jb20iLCJ0eXBlIjoidGV4dCJ9LHsiZW5hYmxlZCI6dHJ1ZSwia2V5IjoibWVzc2FnZV9pZCIsInZhbHVlIjoiIiwidHlwZSI6InRleHQifV0__img_srchttpsrun_pstmn_iobutton_svg_altRun_in_Postman_ap__h2Sample_Appsh2____a_hrefhttpsgithub_comtelstraMessagingAPI_perl_sample_appPerl_Sample_Appa____a_hrefhttpsgithub_comtelstramessaging_sample_code_happy_chatHappy_Chat_Appa____a_hrefhttpsgithub_comdeveloperstevetelstra_messaging_phpPHP_Sample_Appa__h2SDK_reposh2____a_hrefhttpsgithub_comtelstraMessagingAPI_SDK_phpMessaging_API___PHP_SDKa____a_hrefhttpsgithub_comtelstraMessagingAPI_SDK_pythonMessaging_API___Python_SDKa____a_hrefhttpsgithub_comtelstraMessagingAPI_SDK_rubyMessaging_API___Ruby_SDKa____a_hrefhttpsgithub_comtelstraMessagingAPI_SDK_nodeMessaging_API___NodeJS_SDKa____a_hrefhttpsgithub_comtelstraMessagingAPI_SDK_dotnetMessaging_API____Net2_SDKa____a_hrefhttpsgithub_comtelstraMessagingAPI_SDK_JavaMessaging_API___Java_SDKa_Delivery_NotificationThe_API_provides_several_methods_for_notifying_when_a_message_has_been_delivered_to_the_destination_ol__liWhen_you_provision_a_number_there_is_an_opportunity_to_specify_a_codenotifyURLcode_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__liIf_you_do_not_specify_a_URL_you_can_always_call_the_codeGET_smscode_API_get_the_latest_replies_to_the_message_liolIPlease_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_Ih2Notification_URL_Formath2When_a_message_has_reached_its_final_state_the_API_will_send_a_POST_to_the_URL_that_has_been_previously_specified__h3Notification_URL_Format_for_SMSh3precode_classlanguage_sh____to_61418123456____sentTimestamp_2017_03_17T1005221000____receivedTimestamp_2017_03_17T1005231000____messageId_cccb284200035236000000000ee9d074019e03011261418123456____deliveryStatus_DELIVRD__codepreThe_fields_are_table__thead____tr______thFieldth______thDescriptionth____tr__thead__tbody____tr______tdcodetocodetd______tdThe_number_the_message_was_sent_to_td____tr____tr______tdcodereceivedTimestampcodetd______tdTime_the_message_was_sent_to_the_API_td____tr____tr______tdcodesentTimestampcodetd______tdTime_handling_of_the_message_ended_td____tr____tr______tdcodedeliveryStatuscodetd______tdThe_final_state_of_the_message_td____tr____tr______tdcodemessageIdcodetd______tdThe_same_reference_that_was_returned_when_the_original_message_was_sent_td____tr____tr______tdcodereceivedTimestampcodetd______tdTime_the_message_was_sent_to_the_API_td____tr__tbodytableUpon_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_h3Notification_URL_Format_for_SMS_Repliesh3precode_classlanguage_sh____status_RECEIVED____destinationAddress_61418123456____senderAddress_61421987654____message_Foo____________sentTimestamp_2018_03_23T1210061000_______________________________codepreThe_fields_are_table__thead____tr______thFieldth______thDescriptionth____tr__thead__tbody____tr______tdcodestatuscodetd______tdThe_final_state_of_the_message_td____tr____tr______tdcodedestinationAddresscodetd______tdThe_number_the_message_was_sent_to_td____tr____tr______tdcodesenderAddresscodetd______tdThe_number_the_message_was_sent_from_td____tr____tr______tdcodemessagecodetd______tdThe_sontent_of_the_SMS_reply_td____tr____tr______tdcodesentTimestampcodetd______tdTime_handling_of_the_message_ended_td____tr__tbodytableh3Notification_URL_Format_for_MMS_Repliesh3precode_classlanguage_sh____status_RECEIVED____destinationAddress_61418123456____senderAddress_61421987654____subject_Foo____sentTimestamp_2018_03_23T1215451000____envelope_string____MMSContent____________________type_applicationsmil________filename_smil_xml________payload_string_____________________type_imagejpeg________filename_sample_jpeg________payload_string_______________codepreThe_fields_are_table__thead____tr______thFieldth______thDescriptionth____tr__thead__tbody____tr______tdcodestatuscodetd______tdThe_final_state_of_the_message_td____tr____tr______tdcodedestinationAddresscodetd______tdThe_number_the_message_was_sent_to_td____tr____tr______tdcodesenderAddresscodetd______tdThe_number_the_message_was_sent_from_td____tr____tr______tdcodesubjectcodetd______tdThe_subject_assigned_to_the_message_td____tr____tr______tdcodesentTimestampcodetd______tdTime_handling_of_the_message_ended_td____tr____tr______tdcodeenvelopecodetd______tdInformation_about_about_terminal_type_and_originating_operator_td____tr____tr______tdcodeMMSContentcodetd______tdAn_array_of_the_actual_content_of_the_reply_message_td____tr____tr______tdcodetypecodetd______tdThe_content_type_of_the_message_td____tr____tr______tdcodefilenamecodetd______tdThe_filename_for_the_message_content_td____tr____tr______tdcodepayloadcodetd______tdThe_content_of_the_message_td____tr__tbodytable_Frequently_Asked_QuestionsQ_Can_I_send_a_broadcast_message_using_the_Telstra_Messging_APIA__Yes__Recipient_numbers_can_be_in_teh_form_of_an_array_of_strings_if_a_broadcast_message_needs_to_be_sent_h2Notesh2a_hrefhttppetstore_swagger_iourlhttpsraw_githubusercontent_comtelstraMessagingAPI_v2masterdocsswaggermessaging_api_swagger_yaml_target_blankView_messaging_in_Swagger_UIa", "license": "MIT", "main": "src/index.js", "scripts": { diff --git a/src/ApiClient.js b/src/ApiClient.js index e69ed67..89aa3ee 100644 --- a/src/ApiClient.js +++ b/src/ApiClient.js @@ -1,13 +1,13 @@ /** * Telstra Messaging API - * The Telstra SMS Messaging API allows your applications to send and receive SMS text messages from Australia's leading network operator. It also allows your application to track the delivery status of both sent and received SMS messages. + * # 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 * - * OpenAPI spec version: 2.2.4 + * OpenAPI spec version: 2.2.6 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: unset + * Swagger Codegen version: 2.3.1 * * Do not edit the class manually. * @@ -32,7 +32,7 @@ /** * @module ApiClient - * @version 1.0.1 + * @version 1.0.4 */ /** diff --git a/src/api/AuthenticationApi.js b/src/api/AuthenticationApi.js index 548981e..027e43b 100644 --- a/src/api/AuthenticationApi.js +++ b/src/api/AuthenticationApi.js @@ -1,13 +1,13 @@ /** * Telstra Messaging API - * The Telstra SMS Messaging API allows your applications to send and receive SMS text messages from Australia's leading network operator. It also allows your application to track the delivery status of both sent and received SMS messages. + * # 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 * - * OpenAPI spec version: 2.2.4 + * OpenAPI spec version: 2.2.6 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: unset + * Swagger Codegen version: 2.3.1 * * Do not edit the class manually. * @@ -33,7 +33,7 @@ /** * Authentication service. * @module api/AuthenticationApi - * @version 1.0.1 + * @version 1.0.4 */ /** @@ -56,8 +56,8 @@ */ /** - * Generate authentication token - * Generate authentication token + * 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 &quot;API Free Trial&quot; Product. The grant_type should be left as `client_credentials` and the scope as `NSMS`. The token will expire in one hour. <pre><code class=\"language-sh\"> #!/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&amp;client_id=$CLIENT_KEY&amp;client_secret=CLIENT_SECRET&amp;scope=NSMS' \\ 'https://tapi.telstra.com/v2/oauth/token' </code></pre> * @param {String} clientId * @param {String} clientSecret * @param {String} grantType diff --git a/src/api/MessagingApi.js b/src/api/MessagingApi.js index 2b7a8c9..5f32eb4 100644 --- a/src/api/MessagingApi.js +++ b/src/api/MessagingApi.js @@ -1,13 +1,13 @@ /** * Telstra Messaging API - * The Telstra SMS Messaging API allows your applications to send and receive SMS text messages from Australia's leading network operator. It also allows your application to track the delivery status of both sent and received SMS messages. + * # 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 * - * OpenAPI spec version: 2.2.4 + * OpenAPI spec version: 2.2.6 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: unset + * Swagger Codegen version: 2.3.1 * * Do not edit the class manually. * @@ -33,7 +33,7 @@ /** * Messaging service. * @module api/MessagingApi - * @version 1.0.1 + * @version 1.0.4 */ /** @@ -105,8 +105,8 @@ /** * Get SMS Status - * Get Message Status - * @param {String} messageId Unique identifier of a message - it is the value returned from a previous POST call to https://api.telstra.com/v2/messages/sms + * If no notification URL has been specified, it is possible to poll for the message status. <pre><code class=\"language-sh\"> #!/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\" </code></pre> 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. + * @param {String} messageId Unique identifier of a message - it is the value returned from a previous POST call to https://api.telstra.com/v2/messages/sms. * @param {module:api/MessagingApi~getSMSStatusCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link Array.} */ @@ -153,7 +153,7 @@ /** * Retrieve SMS Responses - * Retrieve Messages + * 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. * @param {module:api/MessagingApi~retrieveSMSResponsesCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link module:model/InboundPollResponse} */ @@ -241,8 +241,8 @@ /** * Send SMS - * Send Message - * @param {module:model/SendSMSRequest} payload A JSON or XML payload containing the recipient's phone number and text message. The recipient number should be in the format '04xxxxxxxx' where x is a digit + * Send an SMS Message to a single or multiple mobile number/s. <h3>Send message to a single number: </h3> <pre><code class=\"language-sh\"> #!/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\" </code></pre> \\ <h3>Send message to multiple numbers: </h3> <pre><code class=\"language-sh\"> #!/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 <pre><code class=\"language-sh\"> + * @param {module:model/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. * @param {module:api/MessagingApi~sendSMSCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link module:model/MessageSentResponse} */ diff --git a/src/api/ProvisioningApi.js b/src/api/ProvisioningApi.js index dbce586..0013e76 100644 --- a/src/api/ProvisioningApi.js +++ b/src/api/ProvisioningApi.js @@ -1,13 +1,13 @@ /** * Telstra Messaging API - * The Telstra SMS Messaging API allows your applications to send and receive SMS text messages from Australia's leading network operator. It also allows your application to track the delivery status of both sent and received SMS messages. + * # 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 * - * OpenAPI spec version: 2.2.4 + * OpenAPI spec version: 2.2.6 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: unset + * Swagger Codegen version: 2.3.1 * * Do not edit the class manually. * @@ -33,7 +33,7 @@ /** * Provisioning service. * @module api/ProvisioningApi - * @version 1.0.1 + * @version 1.0.4 */ /** @@ -57,7 +57,7 @@ /** * Create Subscription - * Provision a mobile number + * Invoke the provisioning API to get a dedicated mobile number for an account or application. <pre><code class=\"language-sh\"> #!/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\" } }' </code></pre> * @param {module:model/ProvisionNumberRequest} body A JSON payload containing the required attributes * @param {module:api/ProvisioningApi~createSubscriptionCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link module:model/ProvisionNumberResponse} diff --git a/src/index.js b/src/index.js index 79dec71..3b2d8e7 100644 --- a/src/index.js +++ b/src/index.js @@ -1,13 +1,13 @@ /** * Telstra Messaging API - * The Telstra SMS Messaging API allows your applications to send and receive SMS text messages from Australia's leading network operator. It also allows your application to track the delivery status of both sent and received SMS messages. + * # 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 * - * OpenAPI spec version: 2.2.4 + * OpenAPI spec version: 2.2.6 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: unset + * Swagger Codegen version: 2.3.1 * * Do not edit the class manually. * @@ -16,16 +16,16 @@ (function(factory) { if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module. - define(['ApiClient', 'model/DeleteNumberRequest', 'model/ErrorError', 'model/ErrorErrorError', 'model/GetSubscriptionResponse', 'model/InboundPollResponse', 'model/MMSContent', 'model/Message', 'model/MessageSentResponse', 'model/MessageType', 'model/OAuthRequest', 'model/OAuthResponse', 'model/OutboundPollResponse', 'model/ProvisionNumberRequest', 'model/ProvisionNumberResponse', 'model/SendMmsRequest', 'model/SendSMSRequest', 'model/Status', 'api/AuthenticationApi', 'api/MessagingApi', 'api/ProvisioningApi'], factory); + define(['ApiClient', 'model/DeleteNumberRequest', 'model/GetSubscriptionResponse', 'model/InboundPollResponse', 'model/MMSContent', 'model/Message', 'model/MessageSentResponse', 'model/OAuthResponse', 'model/OutboundPollResponse', 'model/ProvisionNumberRequest', 'model/ProvisionNumberResponse', 'model/SendMmsRequest', 'model/SendSMSRequest', 'model/Status', 'api/AuthenticationApi', 'api/MessagingApi', 'api/ProvisioningApi'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - module.exports = factory(require('./ApiClient'), require('./model/DeleteNumberRequest'), require('./model/ErrorError'), require('./model/ErrorErrorError'), require('./model/GetSubscriptionResponse'), require('./model/InboundPollResponse'), require('./model/MMSContent'), require('./model/Message'), require('./model/MessageSentResponse'), require('./model/MessageType'), require('./model/OAuthRequest'), require('./model/OAuthResponse'), require('./model/OutboundPollResponse'), require('./model/ProvisionNumberRequest'), require('./model/ProvisionNumberResponse'), require('./model/SendMmsRequest'), require('./model/SendSMSRequest'), require('./model/Status'), require('./api/AuthenticationApi'), require('./api/MessagingApi'), require('./api/ProvisioningApi')); + module.exports = factory(require('./ApiClient'), require('./model/DeleteNumberRequest'), require('./model/GetSubscriptionResponse'), require('./model/InboundPollResponse'), require('./model/MMSContent'), require('./model/Message'), require('./model/MessageSentResponse'), require('./model/OAuthResponse'), require('./model/OutboundPollResponse'), require('./model/ProvisionNumberRequest'), require('./model/ProvisionNumberResponse'), require('./model/SendMmsRequest'), require('./model/SendSMSRequest'), require('./model/Status'), require('./api/AuthenticationApi'), require('./api/MessagingApi'), require('./api/ProvisioningApi')); } -}(function(ApiClient, DeleteNumberRequest, ErrorError, ErrorErrorError, GetSubscriptionResponse, InboundPollResponse, MMSContent, Message, MessageSentResponse, MessageType, OAuthRequest, OAuthResponse, OutboundPollResponse, ProvisionNumberRequest, ProvisionNumberResponse, SendMmsRequest, SendSMSRequest, Status, AuthenticationApi, MessagingApi, ProvisioningApi) { +}(function(ApiClient, DeleteNumberRequest, GetSubscriptionResponse, InboundPollResponse, MMSContent, Message, MessageSentResponse, OAuthResponse, OutboundPollResponse, ProvisionNumberRequest, ProvisionNumberResponse, SendMmsRequest, SendSMSRequest, Status, AuthenticationApi, MessagingApi, ProvisioningApi) { 'use strict'; /** - * The_Telstra_SMS_Messaging_API_allows_your_applications_to_send_and_receive_SMS_text_messages_from_Australias_leading_network_operator_It_also_allows_your_application_to_track_the_delivery_status_of_both_sent_and_received_SMS_messages_.
+ * _IntroductionSend_and_receive_SMS_and_MMS_messages_globally_using_Telstras_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__FeaturespThe_Telstra_Messaging_API_provides_the_features_below_table__thead____tr______thFeatureth______thDescriptionth____tr__thead__tbody____tr______tdcodeDedicated_Numbercodetd______tdProvision_a_mobile_number_for_your_account_to_be_used_as_from_address_in_the_APItd____tr____tr______tdcodeSend_Messagescodetd______tdSending_SMS_or_MMS_messagestd____tr____tr______tdcodeReceive_Messagescodetd______tdTelstra_will_deliver_messages_sent_to_a_dedicated_number_or_to_the_codenotifyURLcode_defined_by_youtd____tr____tr______tdcodeBroadcast_Messagescodetd______tdInvoke_a_single_API_to_send_a_message_to_a_list_of_number_provided_in_codetocodetd____tr____tr______tdcodeDelivery_Statuscodetd______tdQuery_the_delivery_status_of_your_messagestd____tr____tr______tdcodeCallbackscodetd______tdProvide_a_notification_URL_and_Telstra_will_notify_your_app_when_messages_status_changestd____tr____tr______tdcodeAlphanumeric_Identifiercodetd______tdDifferentiate_yourself_by_providing_an_alphanumeric_string_in_codefromcode__This_feature_is_only_available_on_paid_planstd____tr____tr______tdcodeConcatenationcodetd______tdSend_messages_up_to_1900_characters_long_and_Telstra_will_automaticaly_segment_and_reassemble_themtd____tr____tr______tdcodeReply_Requestcodetd______tdCreate_a_chat_session_by_associating_codemessageIdcode_and_codetocode_number_to_track_responses_received_from_a_mobile_number__We_will_store_this_association_for_8_daystd____tr____tr______tdcodeCharacter_setcodetd______tdAccepts_all_Unicode_characters_as_part_of_UTF_8td____tr____tr______tdcodeBounce_back_responsecodetd______tdSee_if_your_SMS_hits_an_unreachable_or_unallocated_number__Australia_Onlytd____tr____tr______tdcodeQueuingcodetd______tdMessaging_API_will_automatically_queue_and_deliver_each_message_at_a_compliant_rate_td____tr____tr______tdcodeEmoji_Encodingcodetd______tdThe_API_supports_the_encoding_of_the_full_range_of_emojis__Emojis_in_the_reply_messages_will_be_in_their_UTF_8_format_td____tr__tbodytable_Getting_Access_to_the_APIol__liRegister_at_a_hrefhttpsdev_telstra_comhttpsdev_telstra_coma___liAfter_registration_login_to_a_hrefhttpsdev_telstra_comhttpsdev_telstra_coma_______and_navigate_to_the_quotMy_appsquot_page____liCreate_your_application_by_clicking_the_quotAdd_new_appquot_button___liSelect_quotAPI_Free_Trialquot_Product_when_configuring_your_application__This_Product_includes_the_Telstra_Messaging_API_as_well_as_other_APIs__Your_application_will_be_approved_automatically___liThere_is_a_maximum_of_1000_free_messages_per_developer__Additional_messages_and_features_can_be_purchased_from_a_hrefhttpsdev_telstra_comhttpsdev_telstra_coma___liNote_your_codeClient_keycode_and_codeClient_secretcode_as_these_will_be_needed_to_provision_a_number_for_your_application_and_for_authentication_olpNow_head_over_to_bGetting_Startedb_where_you_can_find_a_postmancollection_as_well_as_some_links_to_sample_apps_and_SDKs_to_get_you_started_pHappy_Messaging_Getting_StartedpBelow_are_the_steps_to_get_started_with_the_Telstra_Messaging_API_p__ol____liGenerate_OAuth2_Token_using_your_codeClient_keycode_and_codeClient_secretcode_li____liCreate_Subscription_in_order_to_receive_a_provisioned_number_li____liSend_Message_to_a_specific_mobile_number_li__ol__h2Run_in_Postmanh2__pa__hrefhttpsapp_getpostman_comrun_collectionded00578f69a9deba256env5BMessaging20API20Environments5DW3siZW5hYmxlZCI6dHJ1ZSwia2V5IjoiY2xpZW50X2lkIiwidmFsdWUiOiIiLCJ0eXBlIjoidGV4dCJ9LHsiZW5hYmxlZCI6dHJ1ZSwia2V5IjoiY2xpZW50X3NlY3JldCIsInZhbHVlIjoiIiwidHlwZSI6InRleHQifSx7ImVuYWJsZWQiOnRydWUsImtleSI6ImFjY2Vzc190b2tlbiIsInZhbHVlIjoiIiwidHlwZSI6InRleHQifSx7ImVuYWJsZWQiOnRydWUsImtleSI6Imhvc3QiLCJ2YWx1ZSI6InRhcGkudGVsc3RyYS5jb20iLCJ0eXBlIjoidGV4dCJ9LHsiZW5hYmxlZCI6dHJ1ZSwia2V5IjoiQXV0aG9yaXphdGlvbiIsInZhbHVlIjoiIiwidHlwZSI6InRleHQifSx7ImVuYWJsZWQiOnRydWUsImtleSI6Im9hdXRoX2hvc3QiLCJ2YWx1ZSI6InNhcGkudGVsc3RyYS5jb20iLCJ0eXBlIjoidGV4dCJ9LHsiZW5hYmxlZCI6dHJ1ZSwia2V5IjoibWVzc2FnZV9pZCIsInZhbHVlIjoiIiwidHlwZSI6InRleHQifV0__img_srchttpsrun_pstmn_iobutton_svg_altRun_in_Postman_ap__h2Sample_Appsh2____a_hrefhttpsgithub_comtelstraMessagingAPI_perl_sample_appPerl_Sample_Appa____a_hrefhttpsgithub_comtelstramessaging_sample_code_happy_chatHappy_Chat_Appa____a_hrefhttpsgithub_comdeveloperstevetelstra_messaging_phpPHP_Sample_Appa__h2SDK_reposh2____a_hrefhttpsgithub_comtelstraMessagingAPI_SDK_phpMessaging_API___PHP_SDKa____a_hrefhttpsgithub_comtelstraMessagingAPI_SDK_pythonMessaging_API___Python_SDKa____a_hrefhttpsgithub_comtelstraMessagingAPI_SDK_rubyMessaging_API___Ruby_SDKa____a_hrefhttpsgithub_comtelstraMessagingAPI_SDK_nodeMessaging_API___NodeJS_SDKa____a_hrefhttpsgithub_comtelstraMessagingAPI_SDK_dotnetMessaging_API____Net2_SDKa____a_hrefhttpsgithub_comtelstraMessagingAPI_SDK_JavaMessaging_API___Java_SDKa_Delivery_NotificationThe_API_provides_several_methods_for_notifying_when_a_message_has_been_delivered_to_the_destination_ol__liWhen_you_provision_a_number_there_is_an_opportunity_to_specify_a_codenotifyURLcode_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__liIf_you_do_not_specify_a_URL_you_can_always_call_the_codeGET_smscode_API_get_the_latest_replies_to_the_message_liolIPlease_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_Ih2Notification_URL_Formath2When_a_message_has_reached_its_final_state_the_API_will_send_a_POST_to_the_URL_that_has_been_previously_specified__h3Notification_URL_Format_for_SMSh3precode_classlanguage_sh____to_61418123456____sentTimestamp_2017_03_17T1005221000____receivedTimestamp_2017_03_17T1005231000____messageId_cccb284200035236000000000ee9d074019e03011261418123456____deliveryStatus_DELIVRD__codepreThe_fields_are_table__thead____tr______thFieldth______thDescriptionth____tr__thead__tbody____tr______tdcodetocodetd______tdThe_number_the_message_was_sent_to_td____tr____tr______tdcodereceivedTimestampcodetd______tdTime_the_message_was_sent_to_the_API_td____tr____tr______tdcodesentTimestampcodetd______tdTime_handling_of_the_message_ended_td____tr____tr______tdcodedeliveryStatuscodetd______tdThe_final_state_of_the_message_td____tr____tr______tdcodemessageIdcodetd______tdThe_same_reference_that_was_returned_when_the_original_message_was_sent_td____tr____tr______tdcodereceivedTimestampcodetd______tdTime_the_message_was_sent_to_the_API_td____tr__tbodytableUpon_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_h3Notification_URL_Format_for_SMS_Repliesh3precode_classlanguage_sh____status_RECEIVED____destinationAddress_61418123456____senderAddress_61421987654____message_Foo____________sentTimestamp_2018_03_23T1210061000_______________________________codepreThe_fields_are_table__thead____tr______thFieldth______thDescriptionth____tr__thead__tbody____tr______tdcodestatuscodetd______tdThe_final_state_of_the_message_td____tr____tr______tdcodedestinationAddresscodetd______tdThe_number_the_message_was_sent_to_td____tr____tr______tdcodesenderAddresscodetd______tdThe_number_the_message_was_sent_from_td____tr____tr______tdcodemessagecodetd______tdThe_sontent_of_the_SMS_reply_td____tr____tr______tdcodesentTimestampcodetd______tdTime_handling_of_the_message_ended_td____tr__tbodytableh3Notification_URL_Format_for_MMS_Repliesh3precode_classlanguage_sh____status_RECEIVED____destinationAddress_61418123456____senderAddress_61421987654____subject_Foo____sentTimestamp_2018_03_23T1215451000____envelope_string____MMSContent____________________type_applicationsmil________filename_smil_xml________payload_string_____________________type_imagejpeg________filename_sample_jpeg________payload_string_______________codepreThe_fields_are_table__thead____tr______thFieldth______thDescriptionth____tr__thead__tbody____tr______tdcodestatuscodetd______tdThe_final_state_of_the_message_td____tr____tr______tdcodedestinationAddresscodetd______tdThe_number_the_message_was_sent_to_td____tr____tr______tdcodesenderAddresscodetd______tdThe_number_the_message_was_sent_from_td____tr____tr______tdcodesubjectcodetd______tdThe_subject_assigned_to_the_message_td____tr____tr______tdcodesentTimestampcodetd______tdTime_handling_of_the_message_ended_td____tr____tr______tdcodeenvelopecodetd______tdInformation_about_about_terminal_type_and_originating_operator_td____tr____tr______tdcodeMMSContentcodetd______tdAn_array_of_the_actual_content_of_the_reply_message_td____tr____tr______tdcodetypecodetd______tdThe_content_type_of_the_message_td____tr____tr______tdcodefilenamecodetd______tdThe_filename_for_the_message_content_td____tr____tr______tdcodepayloadcodetd______tdThe_content_of_the_message_td____tr__tbodytable_Frequently_Asked_QuestionsQ_Can_I_send_a_broadcast_message_using_the_Telstra_Messging_APIA__Yes__Recipient_numbers_can_be_in_teh_form_of_an_array_of_strings_if_a_broadcast_message_needs_to_be_sent_h2Notesh2a_hrefhttppetstore_swagger_iourlhttpsraw_githubusercontent_comtelstraMessagingAPI_v2masterdocsswaggermessaging_api_swagger_yaml_target_blankView_messaging_in_Swagger_UIa.
* The index module provides access to constructors for all the classes which comprise the public API. *

* An AMD (recommended!) or CommonJS application will generally do something equivalent to the following: @@ -53,7 +53,7 @@ * *

* @module index - * @version 1.0.1 + * @version 1.0.4 */ var exports = { /** @@ -66,16 +66,6 @@ * @property {module:model/DeleteNumberRequest} */ DeleteNumberRequest: DeleteNumberRequest, - /** - * The ErrorError model constructor. - * @property {module:model/ErrorError} - */ - ErrorError: ErrorError, - /** - * The ErrorErrorError model constructor. - * @property {module:model/ErrorErrorError} - */ - ErrorErrorError: ErrorErrorError, /** * The GetSubscriptionResponse model constructor. * @property {module:model/GetSubscriptionResponse} @@ -101,16 +91,6 @@ * @property {module:model/MessageSentResponse} */ MessageSentResponse: MessageSentResponse, - /** - * The MessageType model constructor. - * @property {module:model/MessageType} - */ - MessageType: MessageType, - /** - * The OAuthRequest model constructor. - * @property {module:model/OAuthRequest} - */ - OAuthRequest: OAuthRequest, /** * The OAuthResponse model constructor. * @property {module:model/OAuthResponse} diff --git a/src/model/DeleteNumberRequest.js b/src/model/DeleteNumberRequest.js index c39d942..6067b26 100644 --- a/src/model/DeleteNumberRequest.js +++ b/src/model/DeleteNumberRequest.js @@ -1,13 +1,13 @@ /** * Telstra Messaging API - * The Telstra SMS Messaging API allows your applications to send and receive SMS text messages from Australia's leading network operator. It also allows your application to track the delivery status of both sent and received SMS messages. + * # 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 * - * OpenAPI spec version: 2.2.4 + * OpenAPI spec version: 2.2.6 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: unset + * Swagger Codegen version: 2.3.1 * * Do not edit the class manually. * @@ -36,7 +36,7 @@ /** * The DeleteNumberRequest model module. * @module model/DeleteNumberRequest - * @version 1.0.1 + * @version 1.0.4 */ /** diff --git a/src/model/ErrorError.js b/src/model/ErrorError.js index 3fe20a8..5d1c0cd 100644 --- a/src/model/ErrorError.js +++ b/src/model/ErrorError.js @@ -2,12 +2,12 @@ * Telstra Messaging API * The Telstra SMS Messaging API allows your applications to send and receive SMS text messages from Australia's leading network operator. It also allows your application to track the delivery status of both sent and received SMS messages. * - * OpenAPI spec version: 2.2.4 + * OpenAPI spec version: 2.2.5 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: unset + * Swagger Codegen version: 2.3.1 * * Do not edit the class manually. * @@ -36,7 +36,7 @@ /** * The ErrorError model module. * @module model/ErrorError - * @version 1.0.1 + * @version 1.0.3 */ /** diff --git a/src/model/ErrorErrorError.js b/src/model/ErrorErrorError.js index d973c14..48c217d 100644 --- a/src/model/ErrorErrorError.js +++ b/src/model/ErrorErrorError.js @@ -2,12 +2,12 @@ * Telstra Messaging API * The Telstra SMS Messaging API allows your applications to send and receive SMS text messages from Australia's leading network operator. It also allows your application to track the delivery status of both sent and received SMS messages. * - * OpenAPI spec version: 2.2.4 + * OpenAPI spec version: 2.2.5 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: unset + * Swagger Codegen version: 2.3.1 * * Do not edit the class manually. * @@ -36,7 +36,7 @@ /** * The ErrorErrorError model module. * @module model/ErrorErrorError - * @version 1.0.1 + * @version 1.0.3 */ /** diff --git a/src/model/GetSubscriptionResponse.js b/src/model/GetSubscriptionResponse.js index ce91755..83b399d 100644 --- a/src/model/GetSubscriptionResponse.js +++ b/src/model/GetSubscriptionResponse.js @@ -1,13 +1,13 @@ /** * Telstra Messaging API - * The Telstra SMS Messaging API allows your applications to send and receive SMS text messages from Australia's leading network operator. It also allows your application to track the delivery status of both sent and received SMS messages. + * # 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 * - * OpenAPI spec version: 2.2.4 + * OpenAPI spec version: 2.2.6 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: unset + * Swagger Codegen version: 2.3.1 * * Do not edit the class manually. * @@ -36,7 +36,7 @@ /** * The GetSubscriptionResponse model module. * @module model/GetSubscriptionResponse - * @version 1.0.1 + * @version 1.0.4 */ /** diff --git a/src/model/InboundPollResponse.js b/src/model/InboundPollResponse.js index 1e6b3aa..5b6a46f 100644 --- a/src/model/InboundPollResponse.js +++ b/src/model/InboundPollResponse.js @@ -1,13 +1,13 @@ /** * Telstra Messaging API - * The Telstra SMS Messaging API allows your applications to send and receive SMS text messages from Australia's leading network operator. It also allows your application to track the delivery status of both sent and received SMS messages. + * # 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 * - * OpenAPI spec version: 2.2.4 + * OpenAPI spec version: 2.2.6 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: unset + * Swagger Codegen version: 2.3.1 * * Do not edit the class manually. * @@ -36,7 +36,7 @@ /** * The InboundPollResponse model module. * @module model/InboundPollResponse - * @version 1.0.1 + * @version 1.0.4 */ /** diff --git a/src/model/MMSContent.js b/src/model/MMSContent.js index a3180f6..036c597 100644 --- a/src/model/MMSContent.js +++ b/src/model/MMSContent.js @@ -1,13 +1,13 @@ /** * Telstra Messaging API - * The Telstra SMS Messaging API allows your applications to send and receive SMS text messages from Australia's leading network operator. It also allows your application to track the delivery status of both sent and received SMS messages. + * # 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 * - * OpenAPI spec version: 2.2.4 + * OpenAPI spec version: 2.2.6 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: unset + * Swagger Codegen version: 2.3.1 * * Do not edit the class manually. * @@ -36,7 +36,7 @@ /** * The MMSContent model module. * @module model/MMSContent - * @version 1.0.1 + * @version 1.0.4 */ /** diff --git a/src/model/Message.js b/src/model/Message.js index 6490107..6af8393 100644 --- a/src/model/Message.js +++ b/src/model/Message.js @@ -1,13 +1,13 @@ /** * Telstra Messaging API - * The Telstra SMS Messaging API allows your applications to send and receive SMS text messages from Australia's leading network operator. It also allows your application to track the delivery status of both sent and received SMS messages. + * # 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 * - * OpenAPI spec version: 2.2.4 + * OpenAPI spec version: 2.2.6 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: unset + * Swagger Codegen version: 2.3.1 * * Do not edit the class manually. * @@ -36,16 +36,16 @@ /** * The Message model module. * @module model/Message - * @version 1.0.1 + * @version 1.0.4 */ /** * Constructs a new Message. * @alias module:model/Message * @class - * @param to {String} - * @param deliveryStatus {String} - * @param messageId {String} + * @param to {String} Just a copy of the number the message is sent to. + * @param deliveryStatus {String} Gives an indication if the message has been accepted for delivery. The description field contains information on why a message may have been rejected. + * @param messageId {String} For an accepted message, ths will be a unique reference that can be used to check the messages status. Please refer to the Delivery Notification section. Note that `messageId` will be different for each number that the message was sent to. */ var exports = function(to, deliveryStatus, messageId) { var _this = this; @@ -84,22 +84,22 @@ } /** - * + * Just a copy of the number the message is sent to. * @member {String} to */ exports.prototype['to'] = undefined; /** - * + * Gives an indication if the message has been accepted for delivery. The description field contains information on why a message may have been rejected. * @member {String} deliveryStatus */ exports.prototype['deliveryStatus'] = undefined; /** - * + * For an accepted message, ths will be a unique reference that can be used to check the messages status. Please refer to the Delivery Notification section. Note that `messageId` will be different for each number that the message was sent to. * @member {String} messageId */ exports.prototype['messageId'] = undefined; /** - * + * For an accepted message, ths will be the URL that can be used to check the messages status. Please refer to the Delivery Notification section. * @member {String} messageStatusURL */ exports.prototype['messageStatusURL'] = undefined; diff --git a/src/model/MessageSentResponse.js b/src/model/MessageSentResponse.js index 5361b72..e948ffe 100644 --- a/src/model/MessageSentResponse.js +++ b/src/model/MessageSentResponse.js @@ -1,13 +1,13 @@ /** * Telstra Messaging API - * The Telstra SMS Messaging API allows your applications to send and receive SMS text messages from Australia's leading network operator. It also allows your application to track the delivery status of both sent and received SMS messages. + * # 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 * - * OpenAPI spec version: 2.2.4 + * OpenAPI spec version: 2.2.6 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: unset + * Swagger Codegen version: 2.3.1 * * Do not edit the class manually. * @@ -36,16 +36,16 @@ /** * The MessageSentResponse model module. * @module model/MessageSentResponse - * @version 1.0.1 + * @version 1.0.4 */ /** * Constructs a new MessageSentResponse. * @alias module:model/MessageSentResponse * @class - * @param messages {Array.} - * @param messageType {String} - * @param numberSegments {Number} + * @param messages {Array.} An array of messages. + * @param messageType {String} This returns whether the message sent was a SMS or MMS. + * @param numberSegments {Number} For SMS messages only, the value indicates the number of 160 character message segments sent. */ var exports = function(messages, messageType, numberSegments) { var _this = this; @@ -88,27 +88,27 @@ } /** - * + * An array of messages. * @member {Array.} messages */ exports.prototype['messages'] = undefined; /** - * + * This returns whether the message sent was a SMS or MMS. * @member {String} messageType */ exports.prototype['messageType'] = undefined; /** - * + * For SMS messages only, the value indicates the number of 160 character message segments sent. * @member {Number} numberSegments */ exports.prototype['numberSegments'] = undefined; /** - * + * This returns the number of domestic Australian messages sent. * @member {Number} NumberNationalDestinations */ exports.prototype['NumberNationalDestinations'] = undefined; /** - * + * This returns the number of international messages sent * @member {Number} NumberInternationalDestinations */ exports.prototype['NumberInternationalDestinations'] = undefined; diff --git a/src/model/MessageType.js b/src/model/MessageType.js index e02c3cd..afb50e1 100644 --- a/src/model/MessageType.js +++ b/src/model/MessageType.js @@ -2,12 +2,12 @@ * Telstra Messaging API * The Telstra SMS Messaging API allows your applications to send and receive SMS text messages from Australia's leading network operator. It also allows your application to track the delivery status of both sent and received SMS messages. * - * OpenAPI spec version: 2.2.4 + * OpenAPI spec version: 2.2.5 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: unset + * Swagger Codegen version: 2.3.1 * * Do not edit the class manually. * diff --git a/src/model/OAuthRequest.js b/src/model/OAuthRequest.js index 4eb4fea..47fc2b1 100644 --- a/src/model/OAuthRequest.js +++ b/src/model/OAuthRequest.js @@ -2,12 +2,12 @@ * Telstra Messaging API * The Telstra SMS Messaging API allows your applications to send and receive SMS text messages from Australia's leading network operator. It also allows your application to track the delivery status of both sent and received SMS messages. * - * OpenAPI spec version: 2.2.4 + * OpenAPI spec version: 2.2.5 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: unset + * Swagger Codegen version: 2.3.1 * * Do not edit the class manually. * @@ -36,7 +36,7 @@ /** * The OAuthRequest model module. * @module model/OAuthRequest - * @version 1.0.1 + * @version 1.0.3 */ /** diff --git a/src/model/OAuthResponse.js b/src/model/OAuthResponse.js index 6155168..54c698c 100644 --- a/src/model/OAuthResponse.js +++ b/src/model/OAuthResponse.js @@ -1,13 +1,13 @@ /** * Telstra Messaging API - * The Telstra SMS Messaging API allows your applications to send and receive SMS text messages from Australia's leading network operator. It also allows your application to track the delivery status of both sent and received SMS messages. + * # 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 * - * OpenAPI spec version: 2.2.4 + * OpenAPI spec version: 2.2.6 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: unset + * Swagger Codegen version: 2.3.1 * * Do not edit the class manually. * @@ -36,7 +36,7 @@ /** * The OAuthResponse model module. * @module model/OAuthResponse - * @version 1.0.1 + * @version 1.0.4 */ /** diff --git a/src/model/OutboundPollResponse.js b/src/model/OutboundPollResponse.js index 9cede4a..cb8fc0a 100644 --- a/src/model/OutboundPollResponse.js +++ b/src/model/OutboundPollResponse.js @@ -1,13 +1,13 @@ /** * Telstra Messaging API - * The Telstra SMS Messaging API allows your applications to send and receive SMS text messages from Australia's leading network operator. It also allows your application to track the delivery status of both sent and received SMS messages. + * # 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 * - * OpenAPI spec version: 2.2.4 + * OpenAPI spec version: 2.2.6 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: unset + * Swagger Codegen version: 2.3.1 * * Do not edit the class manually. * @@ -36,7 +36,7 @@ /** * The OutboundPollResponse model module. * @module model/OutboundPollResponse - * @version 1.0.1 + * @version 1.0.4 */ /** @@ -67,12 +67,12 @@ if (data.hasOwnProperty('to')) { obj['to'] = ApiClient.convertToType(data['to'], 'String'); } - if (data.hasOwnProperty('receivedTimestamp')) { - obj['receivedTimestamp'] = ApiClient.convertToType(data['receivedTimestamp'], 'String'); - } if (data.hasOwnProperty('sentTimestamp')) { obj['sentTimestamp'] = ApiClient.convertToType(data['sentTimestamp'], 'String'); } + if (data.hasOwnProperty('receivedTimestamp')) { + obj['receivedTimestamp'] = ApiClient.convertToType(data['receivedTimestamp'], 'String'); + } if (data.hasOwnProperty('deliveryStatus')) { obj['deliveryStatus'] = Status.constructFromObject(data['deliveryStatus']); } @@ -85,16 +85,16 @@ * @member {String} to */ exports.prototype['to'] = undefined; - /** - * The date and time when the message was recieved by recipient. - * @member {String} receivedTimestamp - */ - exports.prototype['receivedTimestamp'] = undefined; /** * The date and time when the message was sent. * @member {String} sentTimestamp */ exports.prototype['sentTimestamp'] = undefined; + /** + * The date and time when the message was recieved by recipient. + * @member {String} receivedTimestamp + */ + exports.prototype['receivedTimestamp'] = undefined; /** * @member {module:model/Status} deliveryStatus */ diff --git a/src/model/ProvisionNumberRequest.js b/src/model/ProvisionNumberRequest.js index d3e43e3..537663e 100644 --- a/src/model/ProvisionNumberRequest.js +++ b/src/model/ProvisionNumberRequest.js @@ -1,13 +1,13 @@ /** * Telstra Messaging API - * The Telstra SMS Messaging API allows your applications to send and receive SMS text messages from Australia's leading network operator. It also allows your application to track the delivery status of both sent and received SMS messages. + * # 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 * - * OpenAPI spec version: 2.2.4 + * OpenAPI spec version: 2.2.6 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: unset + * Swagger Codegen version: 2.3.1 * * Do not edit the class manually. * @@ -36,7 +36,7 @@ /** * The ProvisionNumberRequest model module. * @module model/ProvisionNumberRequest - * @version 1.0.1 + * @version 1.0.4 */ /** @@ -49,6 +49,7 @@ + }; /** @@ -68,20 +69,28 @@ if (data.hasOwnProperty('notifyURL')) { obj['notifyURL'] = ApiClient.convertToType(data['notifyURL'], 'String'); } + if (data.hasOwnProperty('callbackData')) { + obj['callbackData'] = ApiClient.convertToType(data['callbackData'], 'String'); + } } return obj; } /** - * Number of active days + * The number of days before for which this number is provisioned. Usually this will be same as the plan you buy. * @member {Number} activeDays */ exports.prototype['activeDays'] = undefined; /** - * Notify url + * 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. * @member {String} notifyURL */ exports.prototype['notifyURL'] = undefined; + /** + * 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. + * @member {String} callbackData + */ + exports.prototype['callbackData'] = undefined; diff --git a/src/model/ProvisionNumberResponse.js b/src/model/ProvisionNumberResponse.js index 289c369..ac24ccd 100644 --- a/src/model/ProvisionNumberResponse.js +++ b/src/model/ProvisionNumberResponse.js @@ -1,13 +1,13 @@ /** * Telstra Messaging API - * The Telstra SMS Messaging API allows your applications to send and receive SMS text messages from Australia's leading network operator. It also allows your application to track the delivery status of both sent and received SMS messages. + * # 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 * - * OpenAPI spec version: 2.2.4 + * OpenAPI spec version: 2.2.6 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: unset + * Swagger Codegen version: 2.3.1 * * Do not edit the class manually. * @@ -36,7 +36,7 @@ /** * The ProvisionNumberResponse model module. * @module model/ProvisionNumberResponse - * @version 1.0.1 + * @version 1.0.4 */ /** diff --git a/src/model/SendMmsRequest.js b/src/model/SendMmsRequest.js index c750318..a09b223 100644 --- a/src/model/SendMmsRequest.js +++ b/src/model/SendMmsRequest.js @@ -1,13 +1,13 @@ /** * Telstra Messaging API - * The Telstra SMS Messaging API allows your applications to send and receive SMS text messages from Australia's leading network operator. It also allows your application to track the delivery status of both sent and received SMS messages. + * # 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 * - * OpenAPI spec version: 2.2.4 + * OpenAPI spec version: 2.2.6 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: unset + * Swagger Codegen version: 2.3.1 * * Do not edit the class manually. * @@ -36,7 +36,7 @@ /** * The SendMmsRequest model module. * @module model/SendMmsRequest - * @version 1.0.1 + * @version 1.0.4 */ /** @@ -47,7 +47,7 @@ * @param to {String} This is the destination address. * @param subject {String} The subject that will be used in an MMS message. * @param replyRequest {Boolean} If set to true, the reply message functionality will be implemented and the to address will be ignored if present. - * @param mMSContent {Array.} 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. + * @param mMSContent {Array.} 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. */ var exports = function(from, to, subject, replyRequest, mMSContent) { var _this = this; @@ -56,6 +56,7 @@ _this['to'] = to; _this['subject'] = subject; _this['replyRequest'] = replyRequest; + _this['MMSContent'] = mMSContent; }; @@ -82,6 +83,9 @@ if (data.hasOwnProperty('replyRequest')) { obj['replyRequest'] = ApiClient.convertToType(data['replyRequest'], 'Boolean'); } + if (data.hasOwnProperty('notifyURL')) { + obj['notifyURL'] = ApiClient.convertToType(data['notifyURL'], 'String'); + } if (data.hasOwnProperty('MMSContent')) { obj['MMSContent'] = ApiClient.convertToType(data['MMSContent'], [MMSContent]); } @@ -110,7 +114,12 @@ */ exports.prototype['replyRequest'] = undefined; /** - * 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. + * Notify url + * @member {String} notifyURL + */ + exports.prototype['notifyURL'] = undefined; + /** + * 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. * @member {Array.} MMSContent */ exports.prototype['MMSContent'] = undefined; diff --git a/src/model/SendSMSRequest.js b/src/model/SendSMSRequest.js index 4c692e7..c456c58 100644 --- a/src/model/SendSMSRequest.js +++ b/src/model/SendSMSRequest.js @@ -1,13 +1,13 @@ /** * Telstra Messaging API - * The Telstra SMS Messaging API allows your applications to send and receive SMS text messages from Australia's leading network operator. It also allows your application to track the delivery status of both sent and received SMS messages. + * # 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 * - * OpenAPI spec version: 2.2.4 + * OpenAPI spec version: 2.2.6 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: unset + * Swagger Codegen version: 2.3.1 * * Do not edit the class manually. * @@ -36,15 +36,15 @@ /** * The SendSMSRequest model module. * @module model/SendSMSRequest - * @version 1.0.1 + * @version 1.0.4 */ /** * Constructs a new SendSMSRequest. * @alias module:model/SendSMSRequest * @class - * @param to {String} Phone number (in E.164 format) to send the SMS to. This number can be in international format if preceeded by a ‘+’, or in national format. - * @param body {String} The text body of the message. Messages longer than 160 characters will be counted as multiple messages. + * @param to {String} 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\"` + * @param body {String} 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 */ var exports = function(to, body) { var _this = this; @@ -56,6 +56,7 @@ + }; /** @@ -90,45 +91,53 @@ if (data.hasOwnProperty('replyRequest')) { obj['replyRequest'] = ApiClient.convertToType(data['replyRequest'], 'Boolean'); } + if (data.hasOwnProperty('priority')) { + obj['priority'] = ApiClient.convertToType(data['priority'], 'Boolean'); + } } return obj; } /** - * Phone number (in E.164 format) to send the SMS to. This number can be in international format if preceeded by a ‘+’, or in national format. + * 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\"` * @member {String} to */ exports.prototype['to'] = undefined; /** - * The text body of the message. Messages longer than 160 characters will be counted as multiple messages. + * 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 * @member {String} body */ exports.prototype['body'] = undefined; /** - * Phone number (in E.164 format) the SMS was sent from. If not present, the serverice will use the mobile number associated with the application, or it be an Alphanumeric address of up to 11 characters. + * 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. * @member {String} from */ exports.prototype['from'] = undefined; /** - * How long the platform should attempt to deliver the message for. This period is specified in minutes from the message + * 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. * @member {Number} validity */ exports.prototype['validity'] = undefined; /** - * How long the platform should wait before attempting to send the message - specified in minutes. + * 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 * @member {Number} scheduledDelivery */ exports.prototype['scheduledDelivery'] = undefined; /** - * Contains a URL that will be called once your message has been processed. The status may be delivered, expired, deleted, etc. + * Contains a URL that will be called once your message has been processed. The status may be delivered, expired, deleted, etc. It is possible for the network to make a call to a URL when the message has been delivered (or has expired), different URLs can be set per message. Please refer to the Delivery Notification section. * @member {String} notifyURL */ exports.prototype['notifyURL'] = undefined; /** - * If set to true, the reply message functionality will be implemented and the to address will be ignored if present. If false or not present, then normal message handling is implemented. + * If set to true, the reply message functionality will be implemented and the to address will be ignored if present. If false or not present, then normal message handling is implemented. When set to true, network will use a temporary number to deliver this message. All messages sent by mobile to this temporary number will be stored against the same `messageId`. If a `notifyURL` is provided then user response will be delivered to the URL where `messageId` will be same as `messageId` in reponse to original API request. This field contains the message text, this can be up to 500 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. * @member {Boolean} replyRequest */ exports.prototype['replyRequest'] = undefined; + /** + * When messages are queued up for a number, then it is possible to set where a new message will be placed in the queue. If the priority is set to true then the new message will be placed ahead of all messages with a normal priority. If there are no messages queued for the number, then this parameter has no effect. + * @member {Boolean} priority + */ + exports.prototype['priority'] = undefined; diff --git a/src/model/Status.js b/src/model/Status.js index 96bd51e..6380e86 100644 --- a/src/model/Status.js +++ b/src/model/Status.js @@ -1,13 +1,13 @@ /** * Telstra Messaging API - * The Telstra SMS Messaging API allows your applications to send and receive SMS text messages from Australia's leading network operator. It also allows your application to track the delivery status of both sent and received SMS messages. + * # 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 * - * OpenAPI spec version: 2.2.4 + * OpenAPI spec version: 2.2.6 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: unset + * Swagger Codegen version: 2.3.1 * * Do not edit the class manually. *