npm package: @shyam.govardhan/telstra_sms
Description: Telstra Messaging NodeJS API fork
Latest version: 2.0.1

# Telstra_Messaging

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](https://openapi-generator.tech) project:

- API version: 2.2.10
- Package version: 2.0.0
- Build package: org.openapitools.codegen.languages.JavascriptClientCodegen

## Installation

### For [Node.js](https://nodejs.org/)

#### npm

To publish the library as a [npm](https://www.npmjs.com/), please follow the procedure in ["Publishing npm packages"](https://docs.npmjs.com/getting-started/publishing-npm-packages).

Then install it via:

```shell
npm install Telstra_Messaging --save
```

Finally, you need to build the module:

```shell
npm run build
```

##### Local development

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:

```shell
npm install
```

Next, [link](https://docs.npmjs.com/cli/link) it globally in npm with the following, also from `JAVASCRIPT_CLIENT_DIR`:

```shell
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:

```shell
npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
```

Finally, you need to build the module:

```shell
npm run build
```

#### git

If the library is hosted at a git repository, e.g.https://github.com/Telstra/MessagingAPI-SDK-node
then install it via:

```shell
    npm install Telstra/MessagingAPI-SDK-node --save
```

### For browser

The library also works in the browser environment via npm and [browserify](http://browserify.org/). 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):

```shell
browserify main.js > bundle.js
```

Then include *bundle.js* in the HTML pages.

### Webpack Configuration

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:

```javascript
module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}
```

## Getting Started

Please follow the [installation](#installation) instruction and execute the following JS code:

```javascript
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);
});


```

## Documentation for API Endpoints

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 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* | [**mmsHealthCheck**](docs/MessagingApi.md#mmsHealthCheck) | **GET** /messages/mms/healthcheck | MMS Health Check
*TelstraMessaging.MessagingApi* | [**retrieveMmsReplies**](docs/MessagingApi.md#retrieveMmsReplies) | **GET** /messages/mms | Retrieve MMS Replies
*TelstraMessaging.MessagingApi* | [**retrieveSmsReplies**](docs/MessagingApi.md#retrieveSmsReplies) | **GET** /messages/sms | Retrieve SMS Replies
*TelstraMessaging.MessagingApi* | [**sendMms**](docs/MessagingApi.md#sendMms) | **POST** /messages/mms | Send MMS
*TelstraMessaging.MessagingApi* | [**sendMultipleSms**](docs/MessagingApi.md#sendMultipleSms) | **POST** /messages/sms/multi | Send Multiple SMS
*TelstraMessaging.MessagingApi* | [**sendSms**](docs/MessagingApi.md#sendSms) | **POST** /messages/sms | Send SMS
*TelstraMessaging.MessagingApi* | [**smsHealthCheck**](docs/MessagingApi.md#smsHealthCheck) | **GET** /messages/sms/healthcheck | SMS Health Check
*TelstraMessaging.ProvisioningApi* | [**createSubscription**](docs/ProvisioningApi.md#createSubscription) | **POST** /messages/provisioning/subscriptions | Create Subscription
*TelstraMessaging.ProvisioningApi* | [**deleteSubscription**](docs/ProvisioningApi.md#deleteSubscription) | **DELETE** /messages/provisioning/subscriptions | Delete Subscription
*TelstraMessaging.ProvisioningApi* | [**getSubscription**](docs/ProvisioningApi.md#getSubscription) | **GET** /messages/provisioning/subscriptions | Get Subscription


## Documentation for Models

 - [TelstraMessaging.DeleteNumberRequest](docs/DeleteNumberRequest.md)
 - [TelstraMessaging.GetMmsResponse](docs/GetMmsResponse.md)
 - [TelstraMessaging.GetSubscriptionResponse](docs/GetSubscriptionResponse.md)
 - [TelstraMessaging.HealthCheckResponse](docs/HealthCheckResponse.md)
 - [TelstraMessaging.InboundPollResponse](docs/InboundPollResponse.md)
 - [TelstraMessaging.MMSContent](docs/MMSContent.md)
 - [TelstraMessaging.Message](docs/Message.md)
 - [TelstraMessaging.MessageMulti](docs/MessageMulti.md)
 - [TelstraMessaging.MessageSentResponseMms](docs/MessageSentResponseMms.md)
 - [TelstraMessaging.MessageSentResponseSms](docs/MessageSentResponseSms.md)
 - [TelstraMessaging.OAuthResponse](docs/OAuthResponse.md)
 - [TelstraMessaging.OutboundPollResponse](docs/OutboundPollResponse.md)
 - [TelstraMessaging.ProvisionNumberRequest](docs/ProvisionNumberRequest.md)
 - [TelstraMessaging.ProvisionNumberResponse](docs/ProvisionNumberResponse.md)
 - [TelstraMessaging.SendMmsRequest](docs/SendMmsRequest.md)
 - [TelstraMessaging.SendSMSRequest](docs/SendSMSRequest.md)
 - [TelstraMessaging.SendSmsMultiRequest](docs/SendSmsMultiRequest.md)
 - [TelstraMessaging.Status](docs/Status.md)


## Documentation for Authorization



### auth


- **Type**: OAuth
- **Flow**: application
- **Authorization URL**: 
- **Scopes**: 
  - NSMS: NSMS