Skip to main content
POST
/
verifications
/
by_phone_number
/
{phone_number}
/
actions
/
verify
JavaScript
import Telnyx from 'telnyx';

const client = new Telnyx({
  apiKey: 'My API Key',
});

const verifyVerificationCodeResponse = await client.verifications.byPhoneNumber.actions.verify(
  '+13035551234',
  { code: '17686', verify_profile_id: '12ade33a-21c0-473b-b055-b3c836e1c292' },
);

console.log(verifyVerificationCodeResponse.data);
{
  "data": {
    "phone_number": "+13035551234",
    "response_code": "accepted"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

phone_number
string
required

The phone number associated with the verification code being verified. +E164 formatted phone number.

Example:

"+13035551234"

Body

application/json
code
string
required

This is the code the user submits for verification.

Example:

"17686"

verify_profile_id
string<uuid>
required

The identifier of the associated Verify profile.

Example:

"12ade33a-21c0-473b-b055-b3c836e1c292"

Response

Expected verify response to a valid request.

data
object
required