TelstraMessaging - JavaScript client for Telstra_Messaging No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) This SDK is automatically generated by the OpenAPI Generator project:
- API version: 2.2.10
- Package version: 2.0.0
- Build package: org.openapitools.codegen.languages.JavascriptClientCodegen
For Node.js
To publish the library as a npm, please follow the procedure in "Publishing npm packages".
Then install it via:
npm install Telstra_Messaging --save
Finally, you need to build the module:
npm run build
To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing package.json
(and this README). Let's call this JAVASCRIPT_CLIENT_DIR
. Then run:
npm install
Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR
:
npm link
To use the link you just defined in your project, switch to the directory you want to use your Telstra_Messaging from, and run:
npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
Finally, you need to build the module:
npm run build
If the library is hosted at a git repository, e.g.https://github.com/Telstra/MessagingAPI-SDK-node then install it via:
npm install Telstra/MessagingAPI-SDK-node --save
The library also works in the browser environment via npm and browserify. After following
the above steps with Node.js and installing browserify with npm install -g browserify
,
perform the following (assuming main.js is your entry file):
browserify main.js > bundle.js
Then include bundle.js in the HTML pages.
Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:
module: {
rules: [
{
parser: {
amd: false
}
}
]
}
Please follow the installation instruction and execute the following JS code:
var TelstraMessaging = require('Telstra_Messaging');
var api = new TelstraMessaging.AuthenticationApi()
var clientId = "clientId_example"; // {String}
var clientSecret = "clientSecret_example"; // {String}
var grantType = "'client_credentials'"; // {String}
var opts = {
'scope': "scope_example" // {String} NSMS
};
api.authToken(clientId, clientSecret, grantType, opts).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
All URIs are relative to https://tapi.telstra.com/v2
Class | Method | HTTP request | Description |
---|---|---|---|
TelstraMessaging.AuthenticationApi | authToken | POST /oauth/token | Generate OAuth2 token |
TelstraMessaging.MessagingApi | getMmsStatus | GET /messages/mms/{messageid}/status | Get MMS Status |
TelstraMessaging.MessagingApi | getSmsStatus | GET /messages/sms/{messageId}/status | Get SMS Status |
TelstraMessaging.MessagingApi | mmsHealthCheck | GET /messages/mms/healthcheck | MMS Health Check |
TelstraMessaging.MessagingApi | retrieveMmsReplies | GET /messages/mms | Retrieve MMS Replies |
TelstraMessaging.MessagingApi | retrieveSmsReplies | GET /messages/sms | Retrieve SMS Replies |
TelstraMessaging.MessagingApi | sendMms | POST /messages/mms | Send MMS |
TelstraMessaging.MessagingApi | sendMultipleSms | POST /messages/sms/multi | Send Multiple SMS |
TelstraMessaging.MessagingApi | sendSms | POST /messages/sms | Send SMS |
TelstraMessaging.MessagingApi | smsHealthCheck | GET /messages/sms/healthcheck | SMS Health Check |
TelstraMessaging.ProvisioningApi | createSubscription | POST /messages/provisioning/subscriptions | Create Subscription |
TelstraMessaging.ProvisioningApi | deleteSubscription | DELETE /messages/provisioning/subscriptions | Delete Subscription |
TelstraMessaging.ProvisioningApi | getSubscription | GET /messages/provisioning/subscriptions | Get Subscription |
- TelstraMessaging.DeleteNumberRequest
- TelstraMessaging.GetMmsResponse
- TelstraMessaging.GetSubscriptionResponse
- TelstraMessaging.HealthCheckResponse
- TelstraMessaging.InboundPollResponse
- TelstraMessaging.MMSContent
- TelstraMessaging.Message
- TelstraMessaging.MessageMulti
- TelstraMessaging.MessageSentResponseMms
- TelstraMessaging.MessageSentResponseSms
- TelstraMessaging.OAuthResponse
- TelstraMessaging.OutboundPollResponse
- TelstraMessaging.ProvisionNumberRequest
- TelstraMessaging.ProvisionNumberResponse
- TelstraMessaging.SendMmsRequest
- TelstraMessaging.SendSMSRequest
- TelstraMessaging.SendSmsMultiRequest
- TelstraMessaging.Status
- Type: OAuth
- Flow: application
- Authorization URL:
- Scopes:
- NSMS: NSMS