import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
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"
}
]
}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: 'My API Key',
});
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"
}
]
}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.
Successful verification code creation response
Show child attributes
Was this page helpful?