Verify verification code by ID
POST
/
verifications
/
{verification_id}
/
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 verifyVerificationCodeResponse = await client.verifications.actions.verify(
'12ade33a-21c0-473b-b055-b3c836e1c292',
);
console.log(verifyVerificationCodeResponse.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
)
verify_verification_code_response = client.verifications.actions.verify(
verification_id="12ade33a-21c0-473b-b055-b3c836e1c292",
)
print(verify_verification_code_response.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"),
)
verifyVerificationCodeResponse, err := client.Verifications.Actions.Verify(
context.TODO(),
"12ade33a-21c0-473b-b055-b3c836e1c292",
telnyx.VerificationActionVerifyParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", verifyVerificationCodeResponse.Data)
}package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.verifications.actions.ActionVerifyParams;
import com.telnyx.sdk.models.verifications.byphonenumber.actions.VerifyVerificationCodeResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
VerifyVerificationCodeResponse verifyVerificationCodeResponse = client.verifications().actions().verify("12ade33a-21c0-473b-b055-b3c836e1c292");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
verify_verification_code_response = telnyx.verifications.actions.verify("12ade33a-21c0-473b-b055-b3c836e1c292")
puts(verify_verification_code_response)<?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 {
$verifyVerificationCodeResponse = $client->verifications->actions->verify(
'12ade33a-21c0-473b-b055-b3c836e1c292', code: '17686', status: 'accepted'
);
var_dump($verifyVerificationCodeResponse);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx verifications:actions verify \
--api-key 'My API Key' \
--verification-id 12ade33a-21c0-473b-b055-b3c836e1c292curl --request POST \
--url https://api.telnyx.com/v2/verifications/{verification_id}/actions/verify \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"code": "17686",
"status": "accepted"
}
'{
"data": {
"phone_number": "+13035551234",
"response_code": "accepted"
}
}{
"errors": [
{
"code": "10015",
"title": "Invalid sorting value",
"detail": "The value provided for sorting is not valid. Check the value used and try again.",
"source": {
"pointer": "/sort",
"parameter": "<string>"
},
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10015"
}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The identifier of the verification to retrieve.
Example:
"12ade33a-21c0-473b-b055-b3c836e1c292"
Body
application/json
Response
Expected verify 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 verifyVerificationCodeResponse = await client.verifications.actions.verify(
'12ade33a-21c0-473b-b055-b3c836e1c292',
);
console.log(verifyVerificationCodeResponse.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
)
verify_verification_code_response = client.verifications.actions.verify(
verification_id="12ade33a-21c0-473b-b055-b3c836e1c292",
)
print(verify_verification_code_response.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"),
)
verifyVerificationCodeResponse, err := client.Verifications.Actions.Verify(
context.TODO(),
"12ade33a-21c0-473b-b055-b3c836e1c292",
telnyx.VerificationActionVerifyParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", verifyVerificationCodeResponse.Data)
}package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.verifications.actions.ActionVerifyParams;
import com.telnyx.sdk.models.verifications.byphonenumber.actions.VerifyVerificationCodeResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
VerifyVerificationCodeResponse verifyVerificationCodeResponse = client.verifications().actions().verify("12ade33a-21c0-473b-b055-b3c836e1c292");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
verify_verification_code_response = telnyx.verifications.actions.verify("12ade33a-21c0-473b-b055-b3c836e1c292")
puts(verify_verification_code_response)<?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 {
$verifyVerificationCodeResponse = $client->verifications->actions->verify(
'12ade33a-21c0-473b-b055-b3c836e1c292', code: '17686', status: 'accepted'
);
var_dump($verifyVerificationCodeResponse);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx verifications:actions verify \
--api-key 'My API Key' \
--verification-id 12ade33a-21c0-473b-b055-b3c836e1c292curl --request POST \
--url https://api.telnyx.com/v2/verifications/{verification_id}/actions/verify \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"code": "17686",
"status": "accepted"
}
'{
"data": {
"phone_number": "+13035551234",
"response_code": "accepted"
}
}{
"errors": [
{
"code": "10015",
"title": "Invalid sorting value",
"detail": "The value provided for sorting is not valid. Check the value used and try again.",
"source": {
"pointer": "/sort",
"parameter": "<string>"
},
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10015"
}
}
]
}