/check/phone_number/o1

1.API Specification
2.Request Params
3.Response Params
4.Error Codes
5.Sample

1.API Specification

This API is used to check the phone number status.

Request Method

POST

Request URL

https://cloudapi.mexico.accuauth.com/check/phone_number/o1

Debugging Tool

Debugging Tool

2.Request Params

2.1 Request Header

Parameter Type Required Description
X-DF-API-ID string Yes For API credentials,Please visit API Request
X-DF-API-SECRET string Yes For API credentials,Please visit API Request

2.2 Request Body

Fields Type Description
required phone_number string phone number with country code prefix: 52
optional callback string Optional http callback URL; When a pending request is complete, the result will be notified via this URL. See Callback below for detail

2.2.1 Callback

Once the pending request is complete, an http GET request will be initiated with bellowed query parameters (callback parameter must be set).

Parameter Type Description
request_id string Unique id of each request
phone_number string The phone number
phone_status string Phone status is listed belowed
task_id string Task ID of completed request

Note: It's recommended that the callback returns a json result: "{"status": "OK"}"

3.Response Params

Fields Type Description
request_id string Unique id of each request
status string Response status, OK if request success, other if failed; See Error Codes for detail
task_id string A Task ID will be returned if the request is pending, valid within 24 hours. You can request the API /check/phone_number/task_result/o1 later with the task_id to get the result or wait to be notified by the callback.
result object Check result will be returned if the request is completed immediately,See result below for detail

3.1 Elements in result

Fields Type Description
phone_number string The phone number
phone_status string Phone status is listed below

3.2 Possible value of phone_status

Phone Status Description
ring The phone is on and rings
connected User connected the phone
empty The phone number is empty
busy The phone is busy now
turned_off The phone is turned off
outside_service_area The phone is not in the service area
line_abnormal Line abnormality, try again later
temp_unavailable Temporarily unreachable, try again later

Response Syntax
  • Response of pending request:
{
    "status": "OK",
    "task_id: "cc681fda58eb434892e1bb897e9*****",
    "request_id": "TID591cb9fb0e284cf296912a4d0ffea889"
}
  • Response of completed request:
{
    "status": "OK",
    "result": {
      "phone_number": "0062********",
      "phone_status": "ring"
    },
    "request_id": "TID591cb9fb0e284cf296912a4d0ffea889"
}

4.Error Codes

Common error codes of this API:

Http Status Code Status field Description
400 INVALID_ARGUMENT Request parameter is invalid
401 UNAUTHORIZED Unauthorized or access is denied
401 KEY_EXPIRED Your API ID has expired
403 NO_PERMISSION You are not authorized to use this API
403 OUT_OF_QUOTA API calls quota exceeded
403 RATE_LIMIT_EXCEEDED API request frequency exceeds the limit
404 NOT_FOUND Requested API cannot be found
500 INTERNAL_ERROR Internal server error

Comment: Please see the reason field for details when the above 40X error occurred

Response Syntax
{
    "status": "INVALID_ARGUMENT",
    "reason": "argument 'phone_number': not found",
    "request_id": "TID0bb59f6aa6454717b870b16202ccf36f"
}

5.Sample

results matching ""

    No results matching ""