Check out our upcoming events and meetups! View events →
Validate the verification codes sent to the numbers of the hosted order. The verification codes must be created in the verification codes endpoint.
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const response = await client.messagingHostedNumberOrders.validateCodes('id', {
verification_codes: [{ code: 'code', phone_number: 'phone_number' }],
});
console.log(response.data);{
"data": {
"phone_numbers": [
{
"phone_number": "<string>",
"status": "verified"
}
],
"order_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}Documentation Index
Fetch the complete documentation index at: https://developers.telnyx.com/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Order ID related to the validation codes.
Message payload
Show child attributes
Successful response with the phone numbers and their respective status of the validation codes.
Show child attributes
Was this page helpful?
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const response = await client.messagingHostedNumberOrders.validateCodes('id', {
verification_codes: [{ code: 'code', phone_number: 'phone_number' }],
});
console.log(response.data);{
"data": {
"phone_numbers": [
{
"phone_number": "<string>",
"status": "verified"
}
],
"order_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}