Skip to content

Commit 0eacfb0

Browse files
authored
Merge pull request #18 from messente/travis
Release version 2.4.0
2 parents d055dd0 + 705b90c commit 0eacfb0

123 files changed

Lines changed: 4650 additions & 70 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Messente API Library
22

33
- Messente API version: 2.0.0
4-
- NPM package version: 2.2.0
4+
- NPM package version: 2.4.0
55

66
[Messente](https://messente.com) is a global provider of messaging and user verification services. * Send and receive SMS, Viber, WhatsApp and Telegram messages. * Manage contacts and groups. * Fetch detailed info about phone numbers. * Blacklist phone numbers to make sure you're not sending any unwanted messages. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world.
77

@@ -18,6 +18,11 @@ Messente API has the following features:
1818

1919
Messente API Library provides the operations described below to access the features.
2020

21+
### AccountBalanceApi
22+
23+
1. Get account balance [`getAccountBalance`](docs/AccountBalanceApi.md#getaccountbalance)
24+
1. Get account balance [`getAccountBalanceUsingPost`](docs/AccountBalanceApi.md#getaccountbalanceusingpost)
25+
2126
### BlacklistApi
2227

2328
1. Adds a phone number to the blacklist [`addToBlacklist`](docs/BlacklistApi.md#addtoblacklist)
@@ -56,15 +61,33 @@ Messente API Library provides the operations described below to access the featu
5661

5762
1. Requests info about phone numbers [`fetchInfo`](docs/NumberLookupApi.md#fetchinfo)
5863

64+
### NumberVerificationApi
65+
66+
1. verify number [`verifyNumber`](docs/NumberVerificationApi.md#verifynumber)
67+
1. verified the PIN code entered by the user. [`verifyPin`](docs/NumberVerificationApi.md#verifypin)
68+
5969
### OmnimessageApi
6070

6171
1. Cancels a scheduled Omnimessage [`cancelScheduledMessage`](docs/OmnimessageApi.md#cancelscheduledmessage)
6272
1. Sends an Omnimessage [`sendOmnimessage`](docs/OmnimessageApi.md#sendomnimessage)
6373

74+
### PricingApi
75+
76+
1. Get pricelist for account [`getPricelist`](docs/PricingApi.md#getpricelist)
77+
1. Get pricing for a specific country [`getPrices`](docs/PricingApi.md#getprices)
78+
6479
### StatisticsApi
6580

6681
1. Requests statistics reports for each country [`createStatisticsReport`](docs/StatisticsApi.md#createstatisticsreport)
6782

83+
### WhatsAppTemplatesApi
84+
85+
1. Creates a WhatsApp template [`createWhatsappTemplate`](docs/WhatsAppTemplatesApi.md#createwhatsapptemplate)
86+
1. Deletes a WhatsApp template [`deleteWhatsappTemplate`](docs/WhatsAppTemplatesApi.md#deletewhatsapptemplate)
87+
1. Requests a WhatsApp template with the given ID [`getWhatsappTemplateById`](docs/WhatsAppTemplatesApi.md#getwhatsapptemplatebyid)
88+
1. Requests a list of WhatsApp templates [`listWhatsappTemplates`](docs/WhatsAppTemplatesApi.md#listwhatsapptemplates)
89+
1. Updates a WhatsApp template [`updateWhatsappTemplate`](docs/WhatsAppTemplatesApi.md#updatewhatsapptemplate)
90+
6891
## Auth
6992

7093
**Type**: HTTP basic authentication

docs/AccountBalanceApi.md

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
# MessenteApi.AccountBalanceApi
2+
3+
All URIs are relative to *https://api.messente.com/v1*
4+
5+
Method | HTTP request | Description
6+
------------- | ------------- | -------------
7+
[**getAccountBalance**](AccountBalanceApi.md#getAccountBalance) | **GET** /get_balance | Get account balance
8+
[**getAccountBalanceUsingPost**](AccountBalanceApi.md#getAccountBalanceUsingPost) | **POST** /get_balance | Get account balance
9+
10+
11+
<a name="getAccountBalance"></a>
12+
# **getAccountBalance**
13+
> String getAccountBalance(username, password)
14+
15+
Get account balance
16+
17+
### Example
18+
```javascript
19+
var MessenteApi = require('messente_api');
20+
var defaultClient = MessenteApi.ApiClient.instance;
21+
// Configure API key authorization: apiPassword
22+
var apiPassword = defaultClient.authentications['apiPassword'];
23+
apiPassword.apiKey = 'YOUR API KEY';
24+
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
25+
//apiPassword.apiKeyPrefix = 'Token';
26+
// Configure API key authorization: apiUsername
27+
var apiUsername = defaultClient.authentications['apiUsername'];
28+
apiUsername.apiKey = 'YOUR API KEY';
29+
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
30+
//apiUsername.apiKeyPrefix = 'Token';
31+
32+
var apiInstance = new MessenteApi.AccountBalanceApi();
33+
var username = "username_example"; // String | The API username
34+
var password = "password_example"; // String | The API password
35+
var callback = function(error, data, response) {
36+
if (error) {
37+
console.error(error);
38+
} else {
39+
console.log('API called successfully. Returned data: ' + data);
40+
}
41+
};
42+
apiInstance.getAccountBalance(username, password, callback);
43+
```
44+
45+
### Parameters
46+
47+
Name | Type | Description | Notes
48+
------------- | ------------- | ------------- | -------------
49+
**username** | **String**| The API username |
50+
**password** | **String**| The API password |
51+
52+
### Return type
53+
54+
**String**
55+
56+
### Authorization
57+
58+
[apiPassword](../README.md#apiPassword), [apiUsername](../README.md#apiUsername)
59+
60+
### HTTP request headers
61+
62+
- **Content-Type**: Not defined
63+
- **Accept**: text/plain
64+
65+
<a name="getAccountBalanceUsingPost"></a>
66+
# **getAccountBalanceUsingPost**
67+
> String getAccountBalanceUsingPost(username, password)
68+
69+
Get account balance
70+
71+
### Example
72+
```javascript
73+
var MessenteApi = require('messente_api');
74+
var defaultClient = MessenteApi.ApiClient.instance;
75+
// Configure API key authorization: apiPassword
76+
var apiPassword = defaultClient.authentications['apiPassword'];
77+
apiPassword.apiKey = 'YOUR API KEY';
78+
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
79+
//apiPassword.apiKeyPrefix = 'Token';
80+
// Configure API key authorization: apiUsername
81+
var apiUsername = defaultClient.authentications['apiUsername'];
82+
apiUsername.apiKey = 'YOUR API KEY';
83+
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
84+
//apiUsername.apiKeyPrefix = 'Token';
85+
86+
var apiInstance = new MessenteApi.AccountBalanceApi();
87+
var username = "username_example"; // String | The API username
88+
var password = "password_example"; // String | The API password
89+
var callback = function(error, data, response) {
90+
if (error) {
91+
console.error(error);
92+
} else {
93+
console.log('API called successfully. Returned data: ' + data);
94+
}
95+
};
96+
apiInstance.getAccountBalanceUsingPost(username, password, callback);
97+
```
98+
99+
### Parameters
100+
101+
Name | Type | Description | Notes
102+
------------- | ------------- | ------------- | -------------
103+
**username** | **String**| The API username |
104+
**password** | **String**| The API password |
105+
106+
### Return type
107+
108+
**String**
109+
110+
### Authorization
111+
112+
[apiPassword](../README.md#apiPassword), [apiUsername](../README.md#apiUsername)
113+
114+
### HTTP request headers
115+
116+
- **Content-Type**: Not defined
117+
- **Accept**: text/plain
118+

docs/AnyJsonResponse.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# MessenteApi.AnyJsonResponse
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
7+

docs/NumberVerificationApi.md

Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
# MessenteApi.NumberVerificationApi
2+
3+
All URIs are relative to *https://api.messente.com/v1*
4+
5+
Method | HTTP request | Description
6+
------------- | ------------- | -------------
7+
[**verifyNumber**](NumberVerificationApi.md#verifyNumber) | **POST** /verify/start | verify number
8+
[**verifyPin**](NumberVerificationApi.md#verifyPin) | **POST** /verify/pin | verified the PIN code entered by the user.
9+
10+
11+
<a name="verifyNumber"></a>
12+
# **verifyNumber**
13+
> String verifyNumber(username, password, to, opts)
14+
15+
verify number
16+
17+
### Example
18+
```javascript
19+
var MessenteApi = require('messente_api');
20+
var defaultClient = MessenteApi.ApiClient.instance;
21+
// Configure API key authorization: apiPassword
22+
var apiPassword = defaultClient.authentications['apiPassword'];
23+
apiPassword.apiKey = 'YOUR API KEY';
24+
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
25+
//apiPassword.apiKeyPrefix = 'Token';
26+
// Configure API key authorization: apiUsername
27+
var apiUsername = defaultClient.authentications['apiUsername'];
28+
apiUsername.apiKey = 'YOUR API KEY';
29+
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
30+
//apiUsername.apiKeyPrefix = 'Token';
31+
32+
var apiInstance = new MessenteApi.NumberVerificationApi();
33+
var username = "username_example"; // String | The API username
34+
var password = "password_example"; // String | The API password
35+
var to = "to_example"; // String | Receiver's phone number with the country code
36+
var opts = {
37+
'template': "template_example", // String | Template of the message, including PIN code. Placeholder for PIN code is <PIN>. When not set, default template is used: \"Your Verification PIN code is <PIN>\".
38+
'pin_length': "pin_length_example", // String | Length of the PIN code. Minumum 4 digits, maximum 16. Defaults to 4.
39+
'from': "from_example", // String | Sender name. When not set, the default Sender name \"Verigator\" is used. This sender ID also needs to be added to your account beforehand.
40+
'max_tries': "max_tries_example", // String | Maximum number of times the PIN code is sent in total. Defaults to \"2\" - initial PIN code and one retry. It is discouraged to set this value to \"1\" as only the initial PIN code is sent and retry is disabled.
41+
'retry_delay': "retry_delay_example", // String | For how long (in seconds) to wait for next retry, if the correct PIN code has not been entered yet? Defaults to 30 seconds.
42+
'validity': "validity_example", // String | For how long (in seconds) is the PIN code valid. Defaults to 5 minutes (300 seconds). Maximum 30 minutes (1800 seconds).
43+
'ip': "ip_example", // String | IP address of the client making verification request.
44+
'browser': "browser_example", // String | User Agent of the browser. For example \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.130 Safari/537.36\".
45+
'cookie': "cookie_example" // String | Unique cookie assigned to this session. If a user tries logging in with the same cookie present, user is automatically logged in and no PIN code verification is needed.
46+
};
47+
var callback = function(error, data, response) {
48+
if (error) {
49+
console.error(error);
50+
} else {
51+
console.log('API called successfully. Returned data: ' + data);
52+
}
53+
};
54+
apiInstance.verifyNumber(username, password, to, opts, callback);
55+
```
56+
57+
### Parameters
58+
59+
Name | Type | Description | Notes
60+
------------- | ------------- | ------------- | -------------
61+
**username** | **String**| The API username |
62+
**password** | **String**| The API password |
63+
**to** | **String**| Receiver&#39;s phone number with the country code |
64+
**template** | **String**| Template of the message, including PIN code. Placeholder for PIN code is &lt;PIN&gt;. When not set, default template is used: \&quot;Your Verification PIN code is &lt;PIN&gt;\&quot;. | [optional]
65+
**pin_length** | **String**| Length of the PIN code. Minumum 4 digits, maximum 16. Defaults to 4. | [optional]
66+
**from** | **String**| Sender name. When not set, the default Sender name \&quot;Verigator\&quot; is used. This sender ID also needs to be added to your account beforehand. | [optional]
67+
**max_tries** | **String**| Maximum number of times the PIN code is sent in total. Defaults to \&quot;2\&quot; - initial PIN code and one retry. It is discouraged to set this value to \&quot;1\&quot; as only the initial PIN code is sent and retry is disabled. | [optional]
68+
**retry_delay** | **String**| For how long (in seconds) to wait for next retry, if the correct PIN code has not been entered yet? Defaults to 30 seconds. | [optional]
69+
**validity** | **String**| For how long (in seconds) is the PIN code valid. Defaults to 5 minutes (300 seconds). Maximum 30 minutes (1800 seconds). | [optional]
70+
**ip** | **String**| IP address of the client making verification request. | [optional]
71+
**browser** | **String**| User Agent of the browser. For example \&quot;Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.130 Safari/537.36\&quot;. | [optional]
72+
**cookie** | **String**| Unique cookie assigned to this session. If a user tries logging in with the same cookie present, user is automatically logged in and no PIN code verification is needed. | [optional]
73+
74+
### Return type
75+
76+
**String**
77+
78+
### Authorization
79+
80+
[apiPassword](../README.md#apiPassword), [apiUsername](../README.md#apiUsername)
81+
82+
### HTTP request headers
83+
84+
- **Content-Type**: Not defined
85+
- **Accept**: text/plain
86+
87+
<a name="verifyPin"></a>
88+
# **verifyPin**
89+
> String verifyPin(username, password, verification_id, pin, opts)
90+
91+
verified the PIN code entered by the user.
92+
93+
### Example
94+
```javascript
95+
var MessenteApi = require('messente_api');
96+
var defaultClient = MessenteApi.ApiClient.instance;
97+
// Configure API key authorization: apiPassword
98+
var apiPassword = defaultClient.authentications['apiPassword'];
99+
apiPassword.apiKey = 'YOUR API KEY';
100+
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
101+
//apiPassword.apiKeyPrefix = 'Token';
102+
// Configure API key authorization: apiUsername
103+
var apiUsername = defaultClient.authentications['apiUsername'];
104+
apiUsername.apiKey = 'YOUR API KEY';
105+
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
106+
//apiUsername.apiKeyPrefix = 'Token';
107+
108+
var apiInstance = new MessenteApi.NumberVerificationApi();
109+
var username = "username_example"; // String | The API username
110+
var password = "password_example"; // String | The API password
111+
var verification_id = "verification_id_example"; // String | Verification ID returned by the successful verification request.
112+
var pin = "pin_example"; // String | PIN code entered by the user.
113+
var opts = {
114+
'ip': "ip_example", // String | IP address of the client making verification request. If the IP address is from another country, PIN is required even if the cookies match.
115+
'browser': "browser_example", // String | User Agent of the browser. For example \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.130 Safari/537.36\".
116+
'cookie': "cookie_example" // String | Unique cookie assigned to this session. If a user tries logging in with the same cookie present, user is automatically logged in and no PIN code verification is needed.
117+
};
118+
var callback = function(error, data, response) {
119+
if (error) {
120+
console.error(error);
121+
} else {
122+
console.log('API called successfully. Returned data: ' + data);
123+
}
124+
};
125+
apiInstance.verifyPin(username, password, verification_id, pin, opts, callback);
126+
```
127+
128+
### Parameters
129+
130+
Name | Type | Description | Notes
131+
------------- | ------------- | ------------- | -------------
132+
**username** | **String**| The API username |
133+
**password** | **String**| The API password |
134+
**verification_id** | **String**| Verification ID returned by the successful verification request. |
135+
**pin** | **String**| PIN code entered by the user. |
136+
**ip** | **String**| IP address of the client making verification request. If the IP address is from another country, PIN is required even if the cookies match. | [optional]
137+
**browser** | **String**| User Agent of the browser. For example \&quot;Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.130 Safari/537.36\&quot;. | [optional]
138+
**cookie** | **String**| Unique cookie assigned to this session. If a user tries logging in with the same cookie present, user is automatically logged in and no PIN code verification is needed. | [optional]
139+
140+
### Return type
141+
142+
**String**
143+
144+
### Authorization
145+
146+
[apiPassword](../README.md#apiPassword), [apiUsername](../README.md#apiUsername)
147+
148+
### HTTP request headers
149+
150+
- **Content-Type**: Not defined
151+
- **Accept**: text/plain
152+

docs/Price.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# MessenteApi.Price
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**country** | **String** | The alpha-2 code for the country |
7+
**name** | **String** | The name of the country |
8+
**prefix** | **String** | The country code prefix |
9+
**networks** | [**[PriceNetworks]**](PriceNetworks.md) | A list of networks available in the country |
10+
11+

docs/PriceNetworks.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# MessenteApi.PriceNetworks
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**name** | **String** | The name of the network |
7+
**price** | **String** | The price for sending a message to this network |
8+
**mccmnc** | **Number** | The MCCMNC code for the network |
9+
10+

0 commit comments

Comments
 (0)