Submit verification code
POST
/
verified_numbers
/
{phone_number}
/
actions
/
verify
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const verifiedNumberDataWrapper = await client.verifiedNumbers.actions.submitVerificationCode(
'+15551234567',
{ verification_code: '123456' },
);
console.log(verifiedNumberDataWrapper.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
verified_number_data_wrapper = client.verified_numbers.actions.submit_verification_code(
phone_number="+15551234567",
verification_code="123456",
)
print(verified_number_data_wrapper.data)package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
verifiedNumberDataWrapper, err := client.VerifiedNumbers.Actions.SubmitVerificationCode(
context.TODO(),
"+15551234567",
telnyx.VerifiedNumberActionSubmitVerificationCodeParams{
VerificationCode: "123456",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", verifiedNumberDataWrapper.Data)
}package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.verifiednumbers.VerifiedNumberDataWrapper;
import com.telnyx.sdk.models.verifiednumbers.actions.ActionSubmitVerificationCodeParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
ActionSubmitVerificationCodeParams params = ActionSubmitVerificationCodeParams.builder()
.phoneNumber("+15551234567")
.verificationCode("123456")
.build();
VerifiedNumberDataWrapper verifiedNumberDataWrapper = client.verifiedNumbers().actions().submitVerificationCode(params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
verified_number_data_wrapper = telnyx.verified_numbers.actions.submit_verification_code("+15551234567", verification_code: "123456")
puts(verified_number_data_wrapper)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$verifiedNumberDataWrapper = $client
->verifiedNumbers
->actions
->submitVerificationCode('+15551234567', verificationCode: '123456');
var_dump($verifiedNumberDataWrapper);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx verified-numbers:actions submit-verification-code \
--api-key 'My API Key' \
--phone-number +15551234567 \
--verification-code 123456curl --request POST \
--url https://api.telnyx.com/v2/verified_numbers/{phone_number}/actions/verify \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"verification_code": "123456"
}
'{
"data": {
"phone_number": "+15551234567",
"record_type": "verified_number",
"verified_at": "2020-09-14T17:03:32.965812"
}
}{
"errors": [
{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>"
},
"meta": {
"url": "<string>"
}
}
]
}{
"errors": [
{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>"
},
"meta": {
"url": "<string>"
}
}
]
}{
"errors": [
{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>"
},
"meta": {
"url": "<string>"
}
}
]
}{
"errors": [
{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>"
},
"meta": {
"url": "<string>"
}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The phone number being verified. +E164 formatted phone number.
Example:
"+15551234567"
Body
application/json
Example:
"123456"
Response
Expected response to a valid request.
Show child attributes
Show child attributes
Was this page helpful?
⌘I
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const verifiedNumberDataWrapper = await client.verifiedNumbers.actions.submitVerificationCode(
'+15551234567',
{ verification_code: '123456' },
);
console.log(verifiedNumberDataWrapper.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
verified_number_data_wrapper = client.verified_numbers.actions.submit_verification_code(
phone_number="+15551234567",
verification_code="123456",
)
print(verified_number_data_wrapper.data)package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
verifiedNumberDataWrapper, err := client.VerifiedNumbers.Actions.SubmitVerificationCode(
context.TODO(),
"+15551234567",
telnyx.VerifiedNumberActionSubmitVerificationCodeParams{
VerificationCode: "123456",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", verifiedNumberDataWrapper.Data)
}package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.verifiednumbers.VerifiedNumberDataWrapper;
import com.telnyx.sdk.models.verifiednumbers.actions.ActionSubmitVerificationCodeParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
ActionSubmitVerificationCodeParams params = ActionSubmitVerificationCodeParams.builder()
.phoneNumber("+15551234567")
.verificationCode("123456")
.build();
VerifiedNumberDataWrapper verifiedNumberDataWrapper = client.verifiedNumbers().actions().submitVerificationCode(params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
verified_number_data_wrapper = telnyx.verified_numbers.actions.submit_verification_code("+15551234567", verification_code: "123456")
puts(verified_number_data_wrapper)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$verifiedNumberDataWrapper = $client
->verifiedNumbers
->actions
->submitVerificationCode('+15551234567', verificationCode: '123456');
var_dump($verifiedNumberDataWrapper);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx verified-numbers:actions submit-verification-code \
--api-key 'My API Key' \
--phone-number +15551234567 \
--verification-code 123456curl --request POST \
--url https://api.telnyx.com/v2/verified_numbers/{phone_number}/actions/verify \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"verification_code": "123456"
}
'{
"data": {
"phone_number": "+15551234567",
"record_type": "verified_number",
"verified_at": "2020-09-14T17:03:32.965812"
}
}{
"errors": [
{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>"
},
"meta": {
"url": "<string>"
}
}
]
}{
"errors": [
{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>"
},
"meta": {
"url": "<string>"
}
}
]
}{
"errors": [
{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>"
},
"meta": {
"url": "<string>"
}
}
]
}{
"errors": [
{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>"
},
"meta": {
"url": "<string>"
}
}
]
}