Skip to main content

Validate an App Registration Phone Validation

Endpoint​

PUT https://api.verifik.co/v2/phone-validations

This endpoint validates a one-time password (OTP) sent to a user's phone number during the app registration (onboarding) process. It ensures the user-provided OTP is correct and updates the verification status accordingly. This route is specifically designed for users who are in the middle of an app registration flow.

warning

The JWT Token you should use when validating App Registration Phone Validations is provided from the App Registration in creation. You must use the token returned when creating an App Registration to authenticate this request.

Headers​

NameValue
Content-Typeapplication/json
AuthorizationBearer <token>

Params​

NameTypeRequiredDescription
phonestringYesThe phone number that was used to create the phone validation. Spaces will be automatically removed during processing
countryCodestringYesThe country code of the phone number in format +XXX (e.g., +507 for Panama, +1 for United States). Must match the format + followed by 1 to 3 digits
otpnumberYesThe one-time password (OTP) that was sent to the user's phone number
projectstringNoThe unique identifier for the project. Optional, helps narrow down the validation
projectFlowstringNoThe unique identifier for the project flow. Optional, helps narrow down the validation
phoneGatewaystringNoThe delivery method used: sms, whatsapp, or none

Request​

const fetch = require("node-fetch");

async function run() {
const res = await fetch("https://api.verifik.co/v2/phone-validations", {
method: "PUT",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${process.env.VERIFIK_TOKEN}`,
},
body: JSON.stringify({
phone: "62647737",
countryCode: "+507",
otp: 123456
}),
});
console.log(await res.json());
}

run();

Response​

{
"data": {
"_id": "674de8df21c72be3cc42b8a7",
"status": "validated",
"countryCode": "+507",
"phone": "62647737",
"type": "onboarding",
"showFaceLivenessRecommendation": false
}
}

Notes​

  • Onboarding Flow: This endpoint is specifically designed for users in the app registration process, where phone validation is part of the onboarding journey.
  • OTP Expiration: OTPs have a limited lifespan (typically 10 minutes) and will expire after the predefined time. Expired OTPs cannot be validated.
  • Status Updates: Successful validation automatically updates the phone validation status to "validated" and may trigger additional onboarding steps.
  • Webhook Events: Validation events trigger webhook notifications for tracking and integration purposes.
  • Face Liveness: Some project flows may recommend face liveness verification after phone validation as part of the onboarding process.
  • App Registration Linking: When validated through this endpoint, the phone validation is automatically linked to the user's app registration record.
  • Phone Number Formatting: Phone numbers have spaces automatically removed during processing.
  • Country Code Format: The country code must be in the format +XXX where X are digits (1-3 digits maximum).