Verify DecisionTelecom API allows you to verify your mobile phone number using two-factor authentication. Create a new Verify object via the API to start the recipient verification process. DecisionTelecom will take care of generating the token and ensuring that the message is delivered to the recipient.
The Verify API uses HTTPS with an access key that is used as the API authorization. Request and response payloads are formatted as JSON using UTF-8 encoding and URL-encoded values.
API Authorization - Basic Access Key Base64.
Please contact your account manager to get API key.
All you have to do is to check the pin code value that the user enters during verification and pin code value that we return to you in the response. If they match, then the verification was successful.
Verify examples
curl --location --request POST 'https://web.it-decision.com/v1/api/two-factor-auth' \
--header 'Authorization: Basic api key' \
--header 'Content-Type: application/json' \
--data-raw '{"phone":380631211121,"pin_length":10,"template_id":0,"country_iso":"en"}'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"phone\":380631211121,\"pin_length\":10,\"template_id\":0,\"country_iso\":\"en\"}");
Request request = new Request.Builder()
.url("https://web.it-decision.com/v1/api/two-factor-auth")
.method("POST", body)
.addHeader("Authorization", "Basic api key")
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic api key");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"phone": 380631211121,
"pin_length": 10,
"template_id": 0,
"country_iso": "en"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://web.it-decision.com/v1/api/two-factor-auth", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
var client = new RestClient("https://web.it-decision.com/v1/api/two-factor-auth");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Basic api key");
request.AddHeader("Content-Type", "application/json");
var body = @"{""phone"":380631211121,""pin_length"":10,""template_id"":0,""country_iso"":""en""}";
request.AddParameter("application/json", body, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);