Updated on 2023-09-27 GMT+08:00

Querying Allocated Softphone Numbers (V1.0.0) (queryPhone)

Scenario

This interface is invoked to query allocated softphone numbers.

Method

POST

URI

https://Domain name/apiaccess/CC-Management/v1/mobileAgent/queryPhone (For example, the domain name is service.besclouds.com.)

Request Description

Table 1 Request header parameters

No.

Parameter

Type

Mandatory or Not

Description

1

X-APP-Key

String

No

App key, which is the user ID.

2

Authorization

String

Yes

Authentication field. The format is Bearer {Value of AccessToken returned by the tokenByAkSk interface}. (A space is required after Bearer.)

Table 2 Request body parameters

No.

Parameter

Type

Mandatory or Not

Description

1

limit

String

No

Page size for pagination query. The default value is 100, indicating that 100 records are displayed on each page. This parameter is optional.

1

offset

String

No

Pagination query offset. The default value is 0, indicating no offset. This parameter is optional.

Response Description

  • Status code: 200
Table 3 Response body parameters

No.

Parameter

Type

Mandatory or Not

Description

1.1

retCode

String

Yes

Return code. The value 0 indicates success, and other values indicate failure.

1: Query failed.

2: The mobile agent information is empty.

3: The registered service address or port number is empty.

4: The limit or offset pagination data is empty.

5: The virtual call center information is empty.

1.2

retMsg

String

No

Failure cause.

1.3

result

Object

No

Result content.

1.3.1

total

Number

No

Total number of records.

1.3.2

regIPAddress

String

No

Registered address.

Length limit: string (50)

1.3.3

phone

Array [Object]

No

Softphone information list.

1.3.3.1

phoneNum

String

No

Softphone number.

Length limit: string (32)

1.3.3.2

password

String

No

Softphone password.

Length limit: string (50)

1.3.4

regPort

Number

No

Registered port.

Length limit: number (5)

  • Status code: 400

    Incorrect request. Check the request path and parameters.

  • Status code: 401

    Unauthorized operation. 1. Check whether you have purchased related services. 2. Contact customer service to check the status of your account.

  • Status code: 404

    The requested content is not found. Check the request path.

  • Status code: 500

    Business failure. Check the values of parameters in the request.

Error Codes

None

Example

  • Scenario: example message

    Request header:

    x-app-key:9******************************3  
    Authorization:Bearer c******************************f  
    Content-Type:application/json

    Request parameters:

    {
    	"offset": 0,
    	"limit": 3
    }

    Response header:

    {
    	"connection": "keep-alive",
    	"content-type": "application/json;charset=UTF-8"
    }

    Response parameters:

    {
    	"retMsg": "successfully",
    	"retCode": "0",
    	"result": {
    		"total": 6,
    		"regPort": "5060",
    		"phone": [{
    				"phoneNum": "999000",
    				"password": "****"
    			},
    			{
    				"phoneNum": "999001",
    				"password": "****"
    			},
    			{
    				"phoneNum": "999002",
    				"password": "****"
    			}
    		],
    		"regIPAddress": "10.10.18.36"
    	}
    }