import plivo

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

response = client.verify_callerids.initiate_verify(phone_number='<phone_number>',
                                                   alias='<alias>',
                                                     channel='call/sms',
                                                     subaccount='<subaccount>')

print(response)
{
  "api_id": "654a7ca7-b9cc-4285-86f7-cf581f50409f",
  "message": "Verification code is sent to number +12025551XXX which is valid for 15 minutes",
  "verification_uuid": "f87836bd-f3c0-41bb-9498-125e6faaa4d4"
}

This method lets you initiate the number verification.

API Endpoint

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

Atrributes

AttributesDescription
phone_number (string, required)The phone number for verification must be provided in E.164 format. This is mandatory for creating the VerifiedCallerID object.
alias (string, optional)The unique name associated with the verified caller ID.
channel (string, optional)The method used to receive the OTP.
Possible values: sms, call
Default: sms
subaccount (string, optional)A valid sub-account Auth ID.
Default: None
import plivo

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

response = client.verify_callerids.initiate_verify(phone_number='<phone_number>',
                                                   alias='<alias>',
                                                     channel='call/sms',
                                                     subaccount='<subaccount>')

print(response)
{
  "api_id": "654a7ca7-b9cc-4285-86f7-cf581f50409f",
  "message": "Verification code is sent to number +12025551XXX which is valid for 15 minutes",
  "verification_uuid": "f87836bd-f3c0-41bb-9498-125e6faaa4d4"
}