Check out our upcoming events and meetups! View events →
Create verification codes to validate numbers of the hosted order. The verification codes will be sent to the numbers of the hosted order.
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.createVerificationCodes('id', {
phone_numbers: ['string'],
verification_method: 'sms',
});
console.log(response.data);{
"data": [
{
"phone_number": "<string>",
"verification_code_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "sms",
"error": "<string>"
}
]
}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 to have a verification code created.
Message payload
Verification codes created and sent to the phone numbers of the hosted order.
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.createVerificationCodes('id', {
phone_numbers: ['string'],
verification_method: 'sms',
});
console.log(response.data);{
"data": [
{
"phone_number": "<string>",
"verification_code_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "sms",
"error": "<string>"
}
]
}