List verifications by phone number
GET
/
verifications
/
by_phone_number
/
{phone_number}
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const byPhoneNumbers = await client.verifications.byPhoneNumber.list('+13035551234');
console.log(byPhoneNumbers.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
)
by_phone_numbers = client.verifications.by_phone_number.list(
"+13035551234",
)
print(by_phone_numbers.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"),
)
byPhoneNumbers, err := client.Verifications.ByPhoneNumber.List(context.TODO(), "+13035551234")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", byPhoneNumbers.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.byphonenumber.ByPhoneNumberListParams;
import com.telnyx.sdk.models.verifications.byphonenumber.ByPhoneNumberListResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
ByPhoneNumberListResponse byPhoneNumbers = client.verifications().byPhoneNumber().list("+13035551234");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
by_phone_numbers = telnyx.verifications.by_phone_number.list("+13035551234")
puts(by_phone_numbers)<?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 {
$byPhoneNumbers = $client->verifications->byPhoneNumber->list('+13035551234');
var_dump($byPhoneNumbers);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx verifications:by-phone-number list \
--api-key 'My API Key' \
--phone-number +13035551234curl --request GET \
--url https://api.telnyx.com/v2/verifications/by_phone_number/{phone_number} \
--header 'Authorization: Bearer <token>'{
"data": [
{
"id": "12ade33a-21c0-473b-b055-b3c836e1c292",
"type": "sms",
"record_type": "verification",
"phone_number": "+13035551234",
"verify_profile_id": "12ade33a-21c0-473b-b055-b3c836e1c292",
"custom_code": "43612",
"timeout_secs": 300,
"status": "accepted",
"created_at": "2020-09-14T17:03:32.965812",
"updated_at": "2020-09-14T17:03:32.965812"
}
],
"meta": {
"total_pages": 3,
"total_results": 55,
"page_number": 2,
"page_size": 25
}
}{
"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 phone number associated with the verifications to retrieve. +E164 formatted phone number.
Example:
"+13035551234"
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 byPhoneNumbers = await client.verifications.byPhoneNumber.list('+13035551234');
console.log(byPhoneNumbers.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
)
by_phone_numbers = client.verifications.by_phone_number.list(
"+13035551234",
)
print(by_phone_numbers.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"),
)
byPhoneNumbers, err := client.Verifications.ByPhoneNumber.List(context.TODO(), "+13035551234")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", byPhoneNumbers.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.byphonenumber.ByPhoneNumberListParams;
import com.telnyx.sdk.models.verifications.byphonenumber.ByPhoneNumberListResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
ByPhoneNumberListResponse byPhoneNumbers = client.verifications().byPhoneNumber().list("+13035551234");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
by_phone_numbers = telnyx.verifications.by_phone_number.list("+13035551234")
puts(by_phone_numbers)<?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 {
$byPhoneNumbers = $client->verifications->byPhoneNumber->list('+13035551234');
var_dump($byPhoneNumbers);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx verifications:by-phone-number list \
--api-key 'My API Key' \
--phone-number +13035551234curl --request GET \
--url https://api.telnyx.com/v2/verifications/by_phone_number/{phone_number} \
--header 'Authorization: Bearer <token>'{
"data": [
{
"id": "12ade33a-21c0-473b-b055-b3c836e1c292",
"type": "sms",
"record_type": "verification",
"phone_number": "+13035551234",
"verify_profile_id": "12ade33a-21c0-473b-b055-b3c836e1c292",
"custom_code": "43612",
"timeout_secs": 300,
"status": "accepted",
"created_at": "2020-09-14T17:03:32.965812",
"updated_at": "2020-09-14T17:03:32.965812"
}
],
"meta": {
"total_pages": 3,
"total_results": 55,
"page_number": 2,
"page_size": 25
}
}{
"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"
}
}
]
}