tencent cloud



Last updated: 2024-03-07 13:48:08

    1. API Description

    Domain name for API request: sms.tencentcloudapi.com.

    This API is used to query the information of a phone number, including country/region code and standardized E.164 format number.

    • For example, if you query the number +86018845720123, you can get the country/region code 86 and the standardized E.164 number +8618845720123.

    A maximum of 1000 requests can be initiated per second for this API.

    We recommend you to use API Explorer
    Try it
    API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

    2. Input Parameters

    The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

    Parameter Name Required Type Description
    Action Yes String Common Params. The value used for this API: DescribePhoneNumberInfo.
    Version Yes String Common Params. The value used for this API: 2021-01-11.
    Region Yes String Common Params. For more information, please see the list of regions supported by the product.
    PhoneNumberSet.N Yes Array of String A parameter used to query mobile numbers in E.164 format (+[country/region code][subscriber number]). Up to 200 mobile numbers can be queried at a time.
    Take the number +8613711112222 as an example. “86” is the country code (with a “+” sign in its front) and “13711112222” is the subscriber number.

    3. Output Parameters

    Parameter Name Type Description
    PhoneNumberInfoSet Array of PhoneNumberInfo A parameter used to obtain mobile number information.
    RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

    4. Example

    Example1 Sample request

    Input Example

    POST / HTTP/1.1
    Host: sms.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribePhoneNumberInfo
    <Common request parameters>
        "PhoneNumberSet": [

    Output Example

        "Response": {
            "PhoneNumberInfoSet": [
                    "SubscriberNumber": "18511122266",
                    "Message": "Describe success",
                    "Code": "Ok",
                    "PhoneNumber": "+8618511122266",
                    "IsoCode": "CN",
                    "IsoName": "China",
                    "NationCode": "86"
                    "SubscriberNumber": "18511122233",
                    "Message": "Describe success",
                    "Code": "Ok",
                    "PhoneNumber": "+8618511122233",
                    "IsoCode": "CN",
                    "IsoName": "China",
                    "NationCode": "86"
            "RequestId": "a0aabda6-cf91-4f3e-a81f-9198114a2279"

    5. Developer Resources


    TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

    Command Line Interface

    6. Error Code

    The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

    Error Code Description
    FailedOperation.JsonParseFail Failed to parse the request body.
    FailedOperation.PhoneNumberParseFail Failed to parse the mobile number. Please check whether it meets the E.164 standard.
    InvalidParameterValue.IncorrectPhoneNumber Incorrect mobile number format
    LimitExceeded.PhoneNumberCountLimit The number of mobile numbers you query at a time exceeds 200. Please refer to the input parameter PhoneNumberSet.
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support