Retrieves the real-time network status of a phone number, such as active, shutdown, or non-existent. This operation supports queries for numbers in plaintext or numbers encrypted by using MD5, SHA256, or SM3.
Operation description
Before you call this operation, make sure you understand the Product Pricing of Phone Number Pedia.
By default, only an Alibaba Cloud account can call this operation. A RAM user can call this operation only after being granted the required permissions. For more information, see Grant permissions to a RAM user.
Before calling this operation, log on to the Phone Number Pedia console. On the Tag Square page, find the required tag, click Request Activation, and then complete the application form. You can use this operation only after your application is approved.
This feature supports phone numbers from China Telecom, China Unicom, and China Mobile, but does not support phone numbers from China Broadnet. If you call this operation to query the status of a China Broadnet number, the
OperatorLimiterror code and the "The number is limited by the operator." message are returned.
QPS limit
This operation is limited to 300 queries per second (QPS) for each user. Calls that exceed this limit are throttled, which may affect your business. Plan your calls accordingly.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dytns:PhoneNumberStatusForSms |
create |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| AuthCode |
string |
Yes |
The authorization code. Note
On the My Applications page in the Phone Number Pedia console, obtain the authorization ID and use it as the value for this parameter. |
zf08***pi6 |
| InputNumber |
string |
Yes |
The phone number to query.
Important The encrypted string is not case-sensitive. |
181****1234 |
| Mask |
string |
Yes |
The encryption method for the phone number. Valid values:
|
NORMAL |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The returned data. |
||
| Code |
string |
The request status code. Valid values:
|
OK |
| Message |
string |
The description of the status code. |
OK |
| RequestId |
string |
The unique ID of the request. Use this ID to troubleshoot issues. |
68A40250-50CD-034C-B728-0BD135850177 |
| Data |
object |
A container for the returned data. |
|
| Status |
string |
The status of the phone number. Valid values:
Note
Due to carrier system adjustments, the statuses for busy, suspected to be powered off, and powered off are not returned for China Telecom numbers. For more information, see the official announcement. |
NORMAL |
| Carrier |
string |
The carrier of the phone number. If the number has been ported, this parameter returns the current carrier. Valid values:
Note
Queries for China Broadnet numbers are not supported. |
CMCC |
Examples
Success response
JSON format
{
"Code": "OK",
"Message": "OK",
"RequestId": "68A40250-50CD-034C-B728-0BD135850177",
"Data": {
"Status": "NORMAL",
"Carrier": "CMCC"
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 200 | OperatorLimit | The number is limited by the operator. | This mobile phone number is restricted by the carrier. |
| 400 | MobileNumberIllegal | Wrong format of phone number | |
| 400 | CarrierIllegal | Illegal carrier type | |
| 400 | AuthCodeNotExist | The label application form does not exist, please replace the authorization code. | |
| 400 | MobileNumberTypeIllegal | Invalid number type. | |
| 400 | MobileNumberTypeNotMatch | The number and number type do not match. | |
| 400 | isp.UNKNOWN | An error occurred due to unknown reasons. | |
| 400 | InvalidParameter | Invalid parameter. | |
| 400 | AuthCodeIllegal | Illegal authCode. | |
| 500 | SystemError | System error | |
| 500 | Unknown | Unknown error | |
| 500 | EncyrptTypeIllegal | The encryption type of the mobile phone number is illegal | |
| 500 | RequestTimeout | Request supplier timed out. | Request supplier timeout |
| 500 | RequestSupplierError | Request supplier error. | Request supplier error. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.