import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const createVerificationResponse = await client.verifications.triggerCall({
phone_number: '+13035551234',
verify_profile_id: '12ade33a-21c0-473b-b055-b3c836e1c292',
});
console.log(createVerificationResponse.data);{
"data": {
"id": "12ade33a-21c0-473b-b055-b3c836e1c292",
"type": "sms",
"record_type": "verification",
"phone_number": "+13035551234",
"verify_profile_id": "12ade33a-21c0-473b-b055-b3c836e1c292",
"custom_code": "43612",
"timeout_secs": 300,
"status": "accepted",
"created_at": "2020-09-14T17:03:32.965812",
"updated_at": "2020-09-14T17:03:32.965812"
}
}import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const createVerificationResponse = await client.verifications.triggerCall({
phone_number: '+13035551234',
verify_profile_id: '12ade33a-21c0-473b-b055-b3c836e1c292',
});
console.log(createVerificationResponse.data);{
"data": {
"id": "12ade33a-21c0-473b-b055-b3c836e1c292",
"type": "sms",
"record_type": "verification",
"phone_number": "+13035551234",
"verify_profile_id": "12ade33a-21c0-473b-b055-b3c836e1c292",
"custom_code": "43612",
"timeout_secs": 300,
"status": "accepted",
"created_at": "2020-09-14T17:03:32.965812",
"updated_at": "2020-09-14T17:03:32.965812"
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The request body when creating a verification.
+E164 formatted phone number.
"+13035551234"
The identifier of the associated Verify profile.
"12ade33a-21c0-473b-b055-b3c836e1c292"
Send a self-generated numeric code to the end-user
"43612"
The number of seconds the verification code is valid for.
300
Optional extension to dial after call is answered using DTMF digits. Valid digits are 0-9, A-D, *, and #. Pauses can be added using w (0.5s) and W (1s).
"1www2WABCDw9"
Expected verifications response to a valid request.
Show child attributes
"12ade33a-21c0-473b-b055-b3c836e1c292"
The possible types of verification.
sms, call, flashcall "sms"
The possible verification record types.
verification "verification"
+E164 formatted phone number.
"+13035551234"
The identifier of the associated Verify profile.
"12ade33a-21c0-473b-b055-b3c836e1c292"
Send a self-generated numeric code to the end-user
"43612"
This is the number of seconds before the code of the request is expired. Once this request has expired, the code will no longer verify the user. Note: this will override the default_verification_timeout_secs on the Verify profile.
300
The possible statuses of the verification request.
pending, accepted, invalid, expired, error "accepted"
"2020-09-14T17:03:32.965812"
"2020-09-14T17:03:32.965812"
Was this page helpful?