get https://{domainname}/ca_apis/PhoneManageV2
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:
- Generate the Token: Use the 'Generate Token' API to obtain an authentication token.
- Enter the Token ID: Navigate to the right section of this page, under the 'AUTHORIZATION' tab. Here, input the generated token ID.
- With the token entered, pass the below header and body parameters:
Header parameters
Parameter | Description |
---|---|
Content-Type | application/json |
Body Params
Pass the body parameters in the format:
{
"userName":"xxxxx",
"action":"get",
"phoneName":"xxxxxxx"
"phoneNumber":"918xxxxxxx51"
}
Parameter | Description |
---|---|
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" |