Confirm Verification OTP
API to confirm the customer's OTP
You need to pass the verification reference that was returned in the response when the verification OTP was created.

Base URL

Depending on your environment, use any of these Base URL below
Live Base URL: https://api.sendchamp.com/api/v1/
Sandbox Base URL: https://sandbox-api.sendchamp.com/api/v1/
Find the Access Key for Authentication under Account Settings on your Dashboard
post
https://{BASE_URL}
/api/v1/verification/confirm
Confirm Verification OTP

Code Samples

CURL
JSON
PHP
NODE
JAVASCRIPT
PYTHON
C#
JAVA
RUBY
1
curl --location --request POST 'https://sandbox-api.sendchamp.com/api/v1/verification/confirm' \
2
--header 'Accept: application/json' \
3
--header 'Content-Type: application/json' \
4
--header 'Authorization: Bearer sendchamp_test_$2y$10$X5jzvLynMco0dVecsT70t.wKENiiueJh.bSj.S51ZQvWI.zyX.emG' \
5
--data-raw '{
6
"verification_code":"36284",
7
"verification_reference": "VER-Jkrz2O4Hxet0F1muMqxw25jOv"
8
}'
Copied!
1
{
2
"verification_code":"36284",
3
"verification_reference": "VER-Jkrz2O4Hxet0F1muMqxw25jOv"
4
}
Copied!
1
<?php
2
3
$curl = curl_init();
4
5
curl_setopt_array($curl, array(
6
CURLOPT_URL => 'https://sandbox-api.sendchamp.com/api/v1/verification/confirm',
7
CURLOPT_RETURNTRANSFER => true,
8
CURLOPT_ENCODING => '',
9
CURLOPT_MAXREDIRS => 10,
10
CURLOPT_TIMEOUT => 0,
11
CURLOPT_FOLLOWLOCATION => true,
12
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
13
CURLOPT_CUSTOMREQUEST => 'POST',
14
CURLOPT_POSTFIELDS =>'{
15
"verification_code":"36284",
16
"verification_reference": "VER-Jkrz2O4Hxet0F1muMqxw25jOv"
17
}',
18
CURLOPT_HTTPHEADER => array(
19
'Accept: application/json',
20
'Content-Type: application/json',
21
'Authorization: Bearer sendchamp_test_$2y$10$X5jzvLynMco0dVecsT70t.wKENiiueJh.bSj.S51ZQvWI.zyX.emG'
22
),
23
));
24
25
$response = curl_exec($curl);
26
27
curl_close($curl);
28
echo $response;
29
Copied!
1
var request = require('request');
2
3
var options = {
4
'method': 'POST',
5
'url': 'https://sandbox-api.sendchamp.com/api/v1/verification/confirm',
6
'headers': {
7
'Accept': 'application/json',
8
'Content-Type': 'application/json',
9
'Authorization': 'Bearer sendchamp_test_$2y$10$X5jzvLynMco0dVecsT70t.wKENiiueJh.bSj.S51ZQvWI.zyX.emG'
10
},
11
body: JSON.stringify({"verification_code":"36284","verification_reference":"VER-Jkrz2O4Hxet0F1muMqxw25jOv"})
12
13
};
14
15
request(options, function (error, response) {
16
if (error) throw new Error(error);
17
console.log(response.body);
18
});
19
Copied!
1
var data = JSON.stringify({"verification_code":"36284","verification_reference":"VER-Jkrz2O4Hxet0F1muMqxw25jOv"});
2
3
var xhr = new XMLHttpRequest();
4
xhr.withCredentials = true;
5
6
xhr.addEventListener("readystatechange", function() {
7
if(this.readyState === 4) {
8
console.log(this.responseText);
9
}
10
});
11
12
xhr.open("POST", "https://sandbox-api.sendchamp.com/api/v1/verification/confirm");
13
xhr.setRequestHeader("Accept", "application/json");
14
xhr.setRequestHeader("Content-Type", "application/json");
15
xhr.setRequestHeader("Authorization", "Bearer sendchamp_test_$2y$10$X5jzvLynMco0dVecsT70t.wKENiiueJh.bSj.S51ZQvWI.zyX.emG");
16
17
xhr.send(data);
Copied!
1
import requests
2
3
url = "https://sandbox-api.sendchamp.com/api/v1/verification/confirm"
4
5
payload="{\n \"verification_code\":\"36284\",\n \"verification_reference\": \"VER-Jkrz2O4Hxet0F1muMqxw25jOv\"\n}"
6
headers = {
7
'Accept': 'application/json',
8
'Content-Type': 'application/json',
9
'Authorization': 'Bearer sendchamp_test_$2y$10$X5jzvLynMco0dVecsT70t.wKENiiueJh.bSj.S51ZQvWI.zyX.emG'
10
}
11
12
response = requests.request("POST", url, headers=headers, data=payload)
13
14
print(response.text)
15
Copied!
1
var client = new RestClient("https://sandbox-api.sendchamp.com/api/v1/verification/confirm");
2
client.Timeout = -1;
3
var request = new RestRequest(Method.POST);
4
5
request.AddHeader("Accept", "application/json");
6
request.AddHeader("Content-Type", "application/json");
7
request.AddHeader("Authorization", "Bearer sendchamp_test_$2y$10$X5jzvLynMco0dVecsT70t.wKENiiueJh.bSj.S51ZQvWI.zyX.emG");
8
request.AddParameter("application/json", "{\n \"verification_code\":\"36284\",\n \"verification_reference\": \"VER-Jkrz2O4Hxet0F1muMqxw25jOv\"\n}", ParameterType.RequestBody);
9
10
IRestResponse response = client.Execute(request);
11
12
Console.WriteLine(response.Content);
Copied!
1
Unirest.setTimeouts(0, 0);
2
HttpResponse<String> response = Unirest.post("https://sandbox-api.sendchamp.com/api/v1/verification/confirm")
3
.header("Accept", "application/json")
4
.header("Content-Type", "application/json")
5
.header("Authorization", "Bearer sendchamp_test_$2y$10$X5jzvLynMco0dVecsT70t.wKENiiueJh.bSj.S51ZQvWI.zyX.emG")
6
.body("{\n \"verification_code\":\"36284\",\n \"verification_reference\": \"VER-Jkrz2O4Hxet0F1muMqxw25jOv\"\n}")
7
.asString();
8
Copied!
1
require "uri"
2
require "net/http"
3
4
url = URI("https://sandbox-api.sendchamp.com/api/v1/verification/confirm")
5
6
https = Net::HTTP.new(url.host, url.port)
7
https.use_ssl = true
8
9
request = Net::HTTP::Post.new(url)
10
request["Accept"] = "application/json"
11
request["Content-Type"] = "application/json"
12
request["Authorization"] = "Bearer sendchamp_test_$2y$10$X5jzvLynMco0dVecsT70t.wKENiiueJh.bSj.S51ZQvWI.zyX.emG"
13
request.body = "{\n \"verification_code\":\"36284\",\n \"verification_reference\": \"VER-Jkrz2O4Hxet0F1muMqxw25jOv\"\n}"
14
15
response = https.request(request)
16
puts response.read_body
17
Copied!

Postman Collection

If you have not downloaded the Postman Collection for a quick test, you can do that here

Libraries/SDKs

We would be releasing libraries/SDKs for more easier integrations in your favorite language/framework. If you happen to create one, do let us know via our community and we would be happy to work on making it the official library and some other benefits.

Feedback

We always want to hear about your experience using our API documentation. If you have any comments 😌 or want to tell us good work 😁 , please do tell us here and we will call you.
Don't forget to join our community here
Last modified 14d ago