Latest Legacy

Retrieve details of all verified caller IDs

The method lets you retrieve details of all verified caller IDs on your account.

API Endpoint

GET https://api.plivo.com/v1/Account/{auth_id}/VerifiedCallerId/{phone_number}

Attributes

alias (optional)

The friendly name associated with the verified caller ID

subaccount (optional)

A valid sub-account Auth ID.
Default: None

country (optional)

The 2-digit ISO country code of the verified caller ID

Response

{
  "api_id": "245e58e7-de0d-4d75-844a-5ce55750e0ff",
  "meta": {
    "limit": 20,
    "next": null,
    "offset": 0,
    "previous": null,
    "total_count": 1
  },
  "objects": [
    {
      "alias": "US Mainland",
      "country": "US",
      "created_at": "2024-02-09T03:52:22.880098Z",
      "modified_at": "2024-02-09T03:52:22.880098Z",
      "phone_number": "+12025551XXX",
      "resource_uri": "/v1/Account/{auth_id}/VerifiedCallerId/12025551XXX",
      "subaccount": "",
      "verification_uuid": "f87836bd-f3c0-41bb-9498-125e6faaa4d4"
    }
  ]
}

Example Request

1
2
3
4
5
6
7
import plivo

client = plivo.RestClient('<Auth>', '<Token>')

response = client.verify_callerids.list_verified_caller_id();

print(response)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
require 'rubygems'
require 'plivo'

include Plivo
include Plivo::Exceptions


api = RestClient.new("<auth>", "<token>")
begin
  response = api.verify_caller_id.list()
    puts response
rescue PlivoRESTError => e
  puts 'Exception: ' + e.message
  
end
1
2
3
4
5
6
7
8
9
10
11
12
13
var plivo = require('plivo');

(function main() {
    'use strict';
    
    var client = new plivo.Client("<auth_id>","<auth_token>");
	client.verify.listVerifiedCallerId().then(function(response) {
            console.log(response)
          }, function (err) {
                console.error(err);
            });

})();
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php
/**
 * Example for Retrieve details of all verified caller IDs
 */
require 'vendor/autoload.php';
use Plivo\RestClient;
use Plivo\Exceptions\PlivoRestException;
$client = new RestClient("<auth>","<token>");

    try {
        $response = $client->verifyCallerId->listVerifiedCallerIds(
        [
            'limit' => 1,
            'offset' => 0
        ]
        );
    }
    catch (PlivoRestException $ex) {
    print_r($ex);
    } 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package com.plivo.examples;

import com.plivo.api.Plivo;
import com.plivo.api.models.verify.ListVerifiedCallerId;
import com.plivo.api.models.verify.Verify;

public class verificationCallerID {

  public static void main(String[] args) {
    Plivo.init("<auth>", "<token>");
      try {
        ListVerifiedCallerId response = Verify.listVerifiedCallerID().subaccount("<subaccount>").alias("").limit(1).offset(1);
        System.out.println(response);
      }catch (Exception e){
        e.printStackTrace();
      }
  }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
using System;
using System.Collections.Generic;
using Plivo;
using Plivo.Exception;

namespace PlivoExamples
{
    internal class Program
    {
        public static void Main(string[] args)
        {
            var api = new PlivoApi("<auth-id>","<auth-token>");
            try
            {
                var response = api.VerifyCallerId.List(limit: 20 , country: "IN");
                Console.WriteLine(response);
            }
            catch (PlivoRestException e)
            {
                Console.WriteLine("Exception: " + e.Message);
                Console.WriteLine("Exception: " + e);
            }
        }
    }
}
1
2
curl -i --user AUTH_ID:AUTH_TOKEN \
    https://api.plivo.com/v1/Account/{auth_id}/VerifiedCallerId/
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package main
import (
	"fmt"
	"github.com/plivo/plivo-go/v7"
)

func main() {
	client, err := plivo.NewClient("<Auth>", "<Token>", &plivo.ClientOptions{})
	if err != nil {
		fmt.Print("Error", err.Error())
		return
	}
	response, err := client.VerifyCallerId.ListVerifiedCallerID(plivo.ListVerifiedCallerIdParams{Limit: 1 , Offset:  0,  SubAccount: "<subaccount>", Alias: "Test", Country: "IN"})

	if err != nil {
		fmt.Print("Error", err.Error())
		return
	}
	fmt.Printf("Response: %#v\n", response)