Phone Number Verification
This API allows you to verify a user's phone number by sending a verification code via SMS or voice call, and checking whether the user has entered the correct code.
Phone Number Verification
POST https://api.getspendo.com/gateway/api/v1/verify/phoneNumber
Headers
Name
Type
Description
apiKey*
String
The API key that you get from spendo's dashboard.
Request Body
Name
Type
Description
from*
String
phoneNumber*
String
The phone number to be verified, represented as a string with the country code and without any spaces or special characters.
{
"success": true,
"message": "Request Succesful",
"code": 0,
"data": null
}{
"success": false,
"message": "Error sending OTP",
"code": 0,
"data": null
}Take a look at how you might call this method using our official libraries, or via curl:
curl --location --request POST 'https://api.getspendo.com/gateway/api/v1/verify/phoneNumber' \
--header 'apiKey: test_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
"from": "string",
"phoneNumber": "string"
}'var axios = require('axios');
var data = JSON.stringify({
"from": "string",
"phoneNumber": "string"
});
var config = {
method: 'post',
url: 'https://api.getspendo.com/gateway/api/v1/verify/phoneNumber',
headers: {
'apiKey': 'test_api_key',
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
Last updated
Was this helpful?