tencent cloud

Short Message Service

Release Notes and Announcements
Announcements
Product Introduction
Glossary
Product Overview
Review Standards
Notes
Signature Review Standards
Body Template Review Standards
Sample Body Templates
Reasons for Rejection
Global SMS
Global SMS Intro
Global SMS Pricing
Getting Started
Console Guide
Console Overview
Global SMS
Marketing Management
Business Statistics
Application Management
General Management
Access Management
Practical Tutorial
How to Send Bulk Best Wishes Messages
How to Send SMS Verification Codes
API Documentation
History
Introduction
API Category
Making API Requests
Status Pull APIs
SMS Statistics APIs
SMS Signature APIs
SMS Delivery APIs
SMS Mobile Number APIs
SMS Conversion Rate APIs
SMS Template APIs
Data Types
Error Codes
SMS Callback APIs
SDK Documentation
SDK Download
SDK for Java
SDK for PHP
SDK for Python
SDK for Node.js
SDK for C#
SDK for Go
SDK for C++
FAQ
Billing
Security
Signature
Template
Message Content
Others
Service Agreement
Tencent Cloud SMS Data Processing and Security Agreement
Tencent Cloud SMS Privacy Policy
Service Level Agreement
Tencent Cloud SMS Services Terms of Service
Contact Us

DescribePhoneNumberInfo

PDF
Modo Foco
Tamanho da Fonte
Última atualização: 2025-11-13 21:12:49

1. API Description

Domain name for API request: sms.intl.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.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribePhoneNumberInfo
<Common request parameters>

{
    "PhoneNumberSet": [
        "+8618511122266",
        "+8618511122233"
    ]
}

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

SDK

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.

Ajuda e Suporte

Esta página foi útil?

comentários