DescribePhoneNumberAnalysis

Updated at:

Obtains the result returned by phone number analysis.

Operation description

  • Before you use this API, log on to the Phone Number Service console, go to the Tag Plaza page, find the corresponding tag, click Apply to Activate, fill in the application materials, and then use the API after the application is approved.

  • Before you use this API, make sure that you fully understand the billing of Phone Number Service.

QPS limit

The QPS limit of this API is 1,000 calls per second per user. If the limit is exceeded, API calls are throttled, which may affect your business. Make calls properly.

Authorization information

By default, only Alibaba Cloud accounts can use this API. RAM users can use this API only after they are granted the related API operation permissions. For more information, see Authorize a RAM user.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

dytns:DescribePhoneNumberAnalysis

create

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

AuthCode

string

Yes

The authorization code.

Note

Log on to the Phone Number Service console, go to the My Applications page, and obtain the authorization ID, which is the authorization code.

QASDW@#**

InputNumber

string

Yes

The phone number to be queried.

187****5620

NumberType

integer

No

The type of the phone number. Valid values:

  • 0: mobile phone number

  • 1: mobile IMEI number

0

Mask

string

No

The encryption method of the phone number. Valid values:

  • NORMAL: no encryption

  • MD5

  • SHA256

NORMAL

Rate

integer

No

The score threshold of the phone number. Valid values: 0 to 100.

Important Whether the specified score threshold is accepted is determined by the server. When the specified score threshold is not accepted, the data entered in this field is invalid.

10

Response elements

Element

Type

Description

Example

object

AccessDeniedDetail

string

The details about the access denial. This parameter is returned only if RAM verification fails.

-

RequestId

string

The request ID.

CC3BB6D2-2FDF-4321-9DCE-B38165CE4C47

Message

string

The description of the phone number status.

OK

Data

object

The information about the phone number analysis result.

List

array<object>

The data list.

object

Number

string

The mobile phone number that is passed in.

187****5620

Code

string

The result code returned.

  • YES: valid

  • NO: invalid

  • UNKNOWN: unknown

NO

Code

string

The request status code. Valid values:

OK: The request was successful.

OK

Status code reasons and solutions

HttpCodeReturn codeDescriptionSolution
200OKSuccess.Indicates that the API call is successful.

Exception reasons and solutions

HttpCodeError codeDescriptionSolution
400MobileNumberIllegalThe mobile phone number is invalid.If the mobile phone number is not encrypted, enter a valid 11-digit phone number. If the mobile phone number is encrypted with MD5, this field is a 32-character encrypted string. If the mobile phone number is encrypted with SHA256, this field is a 64-character encrypted string.
400EncyrptTypeIllegalThe encryption type is invalid.Only NORMAL, MD5, and SHA256 encryption methods are supported, and the value must be in uppercase characters.
400MobileNumberTypeNotMatchThe mobile phone number does not match the encryption type.Enter the correct mobile phone number format and encryption type.
400AuthCodeNotExistThe authorization code does not exist or is unavailable.The authorization code does not exist or has not passed the review. Verify the correctness of the authorization code.
400TagNotExistThe tag or business resource does not exist.The tag does not exist or the business resource does not exist. Verify the availability of the tag.
400RateIllegalThe threshold parameter is invalid.The threshold parameter is invalid. Check whether the threshold parameter complies with the requirements.
400InvalidParameterInvalid parameter.A request parameter is incorrect. Check whether the parameters are correct.
400System.LimitControlThrottling error.Limit the query frequency within the normal range. For phone numbers that return this error code, perform appropriate re-queries. We recommend that you do not repeat the query more than three times.
500SystemErrorSystem exception.A system error occurred. Try again later.

Examples

Success response

JSON format

{
  "AccessDeniedDetail": "-",
  "RequestId": "CC3BB6D2-2FDF-4321-9DCE-B38165CE4C47",
  "Message": "OK",
  "Data": {
    "List": [
      {
        "Number": "187****5620",
        "Code": "NO"
      }
    ]
  },
  "Code": "OK"
}

Error codes

HTTP status code

Error code

Error message

Description

400 Product.Unsubscript You have not subscribed to the specified product.
400 Ram.PermissionDeny You are not authorized to perform the operation.
400 System.LimitControl The system is under flow control.
400 Unknown.ResourceOwnerId The resource does not belong to the current user.
400 MobileNumberIllegal Wrong format of phone number
400 EncyrptTypeIllegal The encryption type of the mobile phone number is illegal
400 MobileNumberTypeNotMatch Phone number and encryption type do not match
400 CarrierIllegal Illegal carrier type
400 RateIllegal Illegal threshold parameter
400 InvalidParameter invalid parameter
400 AuthCodeNotExist The authorization code application failed and cannot be used. Failed to apply for an authorization code.
400 TagNotExist The label does not exist.
400 AuthCodeIllegal Illegal authCode.
500 InternalError A system error occurred.
500 SystemError A system error occurred.
500 RequestTimeout Request supplier timed out. Request supplier timeout
500 RequestSupplierError Request supplier error. Request supplier error.
403 Permission.NotAuthorized You are not authorized to perform the operation.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.