import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
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"
}
}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: 'My API Key',
});
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"
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Order ID related to the validation codes.
Message payload
Successful response with the phone numbers and their respective status of the validation codes.
Was this page helpful?