import Prelude from "@prelude.so/sdk"; const client = new Prelude(); async function main() { const check = await client.verification.check({ target: { type: "phone_number", value: "+30123456789", }, code: "123456", }); console.log(check.id); } main();
{ "status": "success", "id": "<string>", "metadata": { "correlation_id": "<string>" }, "request_id": "<string>" }
Check the validity of a verification code.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
The verification target. Either a phone number or an email address. To use the email verification feature contact us to discuss your use case.
Show child attributes
The OTP code to validate.
"12345"
OK
The status of the check.
success
failure
expired_or_not_found
"success"
The verification identifier.
"vrf_01jc0t6fwwfgfsq1md24mhyztj"
The metadata for this verification.