|
| 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's phone number with the country code | |
| 64 | + **template** | **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>\". | [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 \"Verigator\" 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 \"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. | [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 \"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\". | [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 \"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\". | [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 | + |
0 commit comments