Get Phone Number Details (Token authentication)

Get Phone Number Details API is used to get the existing phone number details in CloudAgent. The user MUST pass the ‘action’ parameter with the ‘get’ function.

To use this API with the help of a token, follow these steps:

  1. Generate the Token: Use the 'Generate Token' API to obtain an authentication token.
  2. Enter the Token ID: Navigate to the right section of this page, under the 'AUTHORIZATION' tab. Here, input the generated token ID.
  3. With the token entered, pass the below header and body parameters:

Header parameters

ParameterDescription
Content-Typeapplication/json

Body Params

Pass the body parameters in the format:

{
"userName":"xxxxx",
"action":"get",
"phoneName":"xxxxxxx"
"phoneNumber":"918xxxxxxx51"
}

ParameterDescription
userName*CloudAgent user name
action*The action MUST be ‘get’. (case sensitive)
phoneNumber*Phone number for which the details are required
phoneName*Phone name of which the details are required

❗️

Note

  • The action parameter, ‘get’ is case sensitive.
  • You need to pass either phoneName or phoneNumber to get the other one.

Possible responses

Invalid action"status": "error"
"message": "action not valid"
Invalid phoneNumber"status": "error"
"message": "phoneNumber must be numeric"
Invalid username{"status":"error","message":" userName or apiKey not valid"}
Empty phoneNumber"status": "error"
"message": "phoneNumber cannot be empty"
phoneNumber details"phoneNumber": "94XXXXXX"
"phoneName": "PaXXXXX"
Language
Authorization
Bearer
URL
Click Try It! to start a request and see the response here!