هذه الصفحة غير متوفرة حاليًا بلغتك المحلية. نحن نعمل جاهدين على إضافة المزيد من اللغات. شاكرين تفهمك ودعمك المستمر لنا.
- What's New
- Function Overview
-
Product Bulletin
- [December 9, 2024] Notice on Message & SMS Product Sales Policy Changes
- [July 25, 2024] Notice on Supplementing Qualification Information for Chinese Mainland SMS Users
- [September 14, 2024] Notice on Adjusting the Review Duration of SMS Signature Templates
- [April 3, 2024] Notice on Adjusting Message & SMS for Accounts in Arrears
- Service Overview
- Price Details
- Getting Started
- Purchase Guide
-
User Guide
- Enabling Message & SMS
- Selecting a Service Mode
- Resource Introduction
- Creating an SMS Application
- Applying for an SMS Signature
- Applying for an SMS Template
- Using Group SMS Assistant
- Viewing Statistics (New Version)
- Viewing Statistics (Old Version)
- Viewing Sending Details
- Resource Package Management
- Contact Management
- Blocklist Management
- Settings
- Permission Management
- Developer Guide
- API Reference
-
FAQs
- FAQs
-
Product Specifications
- How Do I Enable the Message & SMS Service?
- What Are the Differences Between International SMSs and Chinese Mainland SMSs?
- What Are the Differences Between Pay-per-Use Billing upon SMS Package Runout (Mode 1) and Suspension upon Resource Package Runout (Mode 2)?
- In Which Countries and Regions Is the Message & SMS Service Available?
- Which Countries and Regions Can International SMSs Be Sent to?
- How Many Characters Can an SMS Contain?
- Is MMS Supported?
- What Languages Are Supported?
- What Protocols Does the Message & SMS Service Support?
- What Is the Recommended Number of Concurrent SMSs per Second on the Message & SMS Platform?
- What Are the SMS Arrival Rate and Delay of the Message & SMS Platform?
- Which Number Segments Does the Message & SMS Service Support?
- Which Websites and Regions Support the Message & SMS Service?
- Do SMS Backend Services Support Multi-AZ Redundancy?
- Does the Message & SMS Service Support Display of Company Names and Logos?
- Is the Message & SMS Service a SaaS Service?
- Is the Message & SMS Service a Global-level or Project-level Service?
- Will I Be Billed for the Message & SMS Service If I No Longer Use it?
- Which Number Segments Does Message & SMS Support?
-
Qualifications (Chinese Mainland SMSs)
- How Do I Submit a Qualification on the Console?
- What Materials Need to Be Uploaded for a Qualification?
- How Do I Set the Qualification Name?
- How Do I Fill in the Qualification Administrator Information?
- How Do I Select the Qualification Application Purpose?
- What Do I Do If There Are Multiple Signatures?
- What Can I Do If the Qualification File Fails to Be Uploaded?
- Can I Use APIs to Submit Qualifications?
- Can I Provide the ID Card of the Same Authorized Representative for Multiple Signatures Belong to Different Entities with Equity Relationships?
- Do the Qualification Materials Need to Be Stamped with the Official Seal?
- Can a Company Submits Multiple Qualifications?
- Why Do I Need to Submit a Qualification for Using Message & SMS After I Have Authenticated a Huawei Cloud Account?
- Why Do I Need to Provide the Qualification Information Again When Applying for a Signature?
- How Do I Associate Qualification Information with a Signature?
- Why Can't I Associate a Signature with an Approved Qualification?
- What Can I Do If an Error Is Reported or a Message Is Displayed Indicating that the System Is Busy When I Submit a Qualification on the Console?
- Why Does the Signature Remain in the "Processing completed (under qualification review)" Status After the Qualification Is Approved and the Signature Is Associated?
- Why Does My Approved Signature Changes to the "Processing completed (real name registration in progress)" Status After Activation?
- After Changing the Company Associated With My Huawei Cloud Account, Do I Need To Resubmit My Qualifications?
-
Signature (Chinese Mainland SMS)
- Signature Rules
- How Long Does It Take to Review a Signature?
- How Do I Modify an SMS Signature?
- How Do I Delete an SMS Signature?
- Can SMS Signatures Have the Same Name But Different Types?
- Can a User Apply for Multiple SMS Signatures?
- How Do I Increase the Signature Quota?
- Can One SMS Signature Be Used in Multiple SMS Templates?
- Can I Create Duplicate SMS Signatures Under the Same or Different Applications?
- Why Is an SMS Signature in Deactivated State? How Do I Activate a Signature?
- How Can I Apply for a Signature If the Application or e-Commerce Platform Shop Is Being Developed and Link Addresses Cannot Be Provided?
- What Do I Do If the Enterprise for Which a Signature to Be Applied for Differs from the Enterprise Authenticated Using Real Name?
- Can I Apply for an SMS Signature Without a Business License?
- Can the Signature Name Be Placed at the End of an SMS Message?
- Can I Modify the Power of Attorney When Applying for a Signature?
- Can I Select Multiple Signature Formats When Applying for a Signature?
- How Do I Select a Qualification When Creating a Signature?
- How Do I Upload a Power of Attorney of the Third Party?
- How Do I Obtain the Template of a Power of Attorney of the Third Party?
-
Template
- Template and Variable Specifications
- How Long Does It Take to Review a Template?
- How Do I Modify an SMS Template?
- How Do I Delete an SMS Template
- How Do I Use a General SMS Template? (Chinese Mainland SMS)
- How Can I View the Content and Related Information of an SMS Template?
- Can I Set the Text Format (Such as Underline and Font Color) in an SMS Message Template?
- What Can I Do If an SMS Template Is Approved and Deactivated?
- Do SMS Templates Support Links?
- How Do I Configure Variables in an SMS Template?
- Is There a Limit on the Number of SMS Templates and Use Times?
- How Do I Increase the Template Quota?
- Can I Customize SMS Content Without a Template?
-
Application
- How Do I Change the SMS Application Name?
- How Do I Modify the Uplink SMS Destination? (Chinese Mainland SMS)
- Can I Delete an SMS Application
- How Do I Create Multiple SMS Applications?
- What Is the Uplink SMS Destination? Does It Have to Be a Website? (Chinese Mainland SMS)
- Can the SMS Platform Send Uplink SMS Messages to Corresponding Destination Addresses in Different Applications? Is Sending Uplink SMS Messages Charged? (Chinese Mainland SMS)
- Can International SMS and Chinese Mainland SMS Share the Same SMS Application and Template?
- How Do I Distinguish SMS Applications Created Using Different IAM Accounts?
- How Do I Send Different Types of SMSs? (Chinese Mainland SMS)
- What Are the Functions of SMS Applications?
- Verification
-
Secondary Development
- How Do I Obtain the Application Access Key from the Message & SMS Platform?
- How Do I Obtain the HTTPS Commissioning Certificate from the Message & SMS Platform?
- How Can I Get the Channel No. Required to Send a Short Message?
- Does SMS API Calling Have PHP and Java Version Requirements?
- Why a Preset 6-Digit Verification Code Becomes a 5-Digit Verification Code After Being Sent?
- What Is the Callback Address? How Do I Set This Address?
- Does the Message & SMS Service Support Privatized Deployment?
- Can the SMS API Be Called by an Internal Network (For Example, an ECS Server)?
- Why Can an SMS Sending Request to an Incorrect Recipient Number Be Successful?
- Must the Message & SMS API Request Address Be a Domain Name? Does the Service Provide a Fixed IP Address?
- Does Message & SMS Provide SDKs?
- Is the Message & SMS Service Affected If the Region Where the Service Is Enabled Is Different from the Region Where Servers Are Located?
-
SMS Sending
- How Do I Send Group SMSs?
- How Do I Determine Whether an SMS Was Sent Successfully
- How Do I Improve the SMS Success Rate?
- Can I Cancel the Sending of an SMS?
- Is the SMS Sending Time Restricted? (Chinese Mainland SMS)
- What Numbers Are Presented to SMS Recipients?
- What is the Function of SMS Channel Numbers?
- Does the Message & SMS Platform Send an SMS Only Once to Duplicate Numbers?
- How Do I Export Failed Numbers in Batches When I Use the Group SMS Assistant?
- Will SMSs Fail to Be Sent Using the Group SMS Assistant If the User Is in Arrears?
- Can I View the Content of a Successful or Failed SMS?
- Can I Use an SMS to Send a Dynamic Short Link?
- How Can I View SMS Sending Tasks and Details?
- Can I Export SMS Send Details?
- How Do I Wrap Text When Sending an SMS?
- Why Can I Send an SMS When My Account Balance Is Zero?
- Can I Limit the Quota of SMS Messages That Can Be Sent by an Application or a Signature?
- How Do I View the Cause of an SMS Sending Failure?
-
Package and Fee
- Is a Failed SMS Billed?
- How Much Does the Message&SMS Service Need to Be Pre-paid?
- Can I Have Free Trial or Free Tier of the SMS Service?
- Will Message & SMS Resources Be Released If an Account Is in Arrears?
- How Can I View the SMS Fees?
- Can I Unsubscribe from an SMS Package?
- Can Unused Quotas Be Refunded?
- Can I Modify the SMS Package Specifications?
- How Can I View the Remaining Quota of the SMS Package?
- Can an SMS Package Be Used by Different Accounts?
- Can I Use an SMS Package Across Regions?
- How Long Is the Validity Period of an SMS Package? Can I Modify It?
- Can I Renew or Repeatedly Purchase SMS Packages?
- Can I Set a Quota Usage Alert for an SMS Package?
- Can I Use a Huawei Cloud SMS Package in a Third-Party Cloud?
- How Do I Purchase a Chinese Mainland SMS Package?
- Can an International SMS Package Be Used to Cover the Chinese Mainland SMS Fees?
- Why Am I Billed on a Pay-per-Use Basis After I Purchased an SMS Package?
- How Does China Broadnet Charge for SMSs? (Chinese Mainland SMS)
- How Is the Group SMS Assistant Charged?
-
Troubleshooting
- What Do I Do If an Error Occurs When I Enable the Message & SMS Service?
- Why Is the Signature Review Rejected? (Chinese Mainland SMS)
- What Do I Do If an Error Is Reported When I Upload a Business License During Signature Adding? (Chinese Mainland SMS)
- Why Are the Applications, Signatures, and Templates Lost?
- Template Rejection Reasons and Handling Suggestions
- Why More than One Segment Is Displayed in Template Details?
- Why Is My SMS Application Paused? How Can I Recover It to the Normal State?
- What Do I Do If Message & SMS API Calling Times Out?
- What Do I Do If an SSL Connection Error Occurs During API Calling?
- How Do I Do If the Test Mobile Number Cannot Receive SMSs Because the Sending Frequency Reaches the Upper Limit During SMS API Test?
- Why Does a Phone Not Receive an SMS After an API Is Called?
- What Do I Do If an Exception Occurs When I Access the Message & SMS Console?
- What Can I Do If the Error "Failed to retrieve reminders." Is Displayed on the Console?
- What Do I Do If the Console Displays a Message Indicating that Basic Tenant Information Fails to Be Queried?
- Why Does IAM Permissions Granted to a Message & SMS Member Account Fail to Take Effect?
- What Do I Do If an International SMS Failed to Be Sent?
- Why Does an SMS Fail to Be Sent?
- Why Some Numbers Cannot Receive SMSs?
- Why Send Result Is Displayed as Sending or the SMS Is Received After a Long Time?
- Why Is a Link in an SMS Displayed as Text?
- Why Is the SMS Quantity on the Console Two Times of the Recipient Number Quantity?
- What Do I Do If "The recipient number quantity is out the range of 1–50000." Is Displayed After Uploading a Number File?
- Why an SMS Signature and an SMS Template Cannot Be Selected in the Group SMS Assistant?
- Why Is the Status Code of an SMS REJECTD?
- What Do I Do If an SMS Is Intercepted by the Phone Security Manager as a Junk Message?
- Why Is a Recipient Blacklisted After Replying "T"? How Do I Remove the Recipient from the Blacklist?
- Why Is a Received SMS Displayed as Garbled Characters?
- What Do I Do If an SMS Fails to Be Sent and Error Code E200028 Is Reported?
- What Do I Do If the Message "Could Not Derive Key" Is Displayed When I Commission the SMS Sending Function?
-
Others
- What Are the Rules for SMS Barring?
- Can Message & SMS Resources Be Transferred Across Accounts?
- Can I Use the Message & SMS Service in Other Cloud Services (Such as Cloudsite Service) If Another Account Has Enabled the Message & SMS Service?
- Can I Migrate SMS Templates and Signatures Archived on a Third-Party Cloud Platform to HUAWEI CLOUD?
- Can I Use Huawei Cloud Message & SMS When My Services Are Deployed on Other Cloud Platforms?
- How Do I Enable the Message & SMS Service Again After It Is Disabled Due to Arrears?
- Are There Any Requirements on the Format of the Number File to Be Imported When Using the Group Message Assistant?
- Are There Any Requirements on the Format of the Mobile Numbers Entered When Calling APIs to Send SMSs?
- Where Are Message & SMS Servers Deployed?
- How Long Is the Test Signature and Template Valid for? (Chinese Mainland SMS)
- How Do I Query SMS Messages Replied by Subscribers (Uplink SMS Messages)? (Chinese Mainland SMS)
- How Do I Use a Test Signature and Template? (Chinese Mainland SMS)
- How Can I Associate a Downlink SMS with an Uplink SMS? (Chinese Mainland SMS)
- Is the Downlink SMS ID the Same as the Uplink SMS ID? (Chinese Mainland SMS)
- How Long Can SMS Sending Records and Service Statistics Be Stored?
- Videos
- General Reference
Copied.
Making an API Request
This section describes the structure of a RESTful API request, and uses the IAM service as an example to explain how to obtain a user token to call an API. The obtained token can then be used to authenticate the calling of other APIs.
Request URI
The format of a request URI is as follows:
{URI-scheme}://{Endpoint}/{resource-path}?{query-string}
Although a request URI is included in the request header, most programming languages or frameworks require passing the request URI separately.
Parameter |
Description |
---|---|
URI-scheme |
Protocol used to transmit requests. All APIs use HTTPS. |
Endpoint |
Domain name or IP address of the server bearing the REST service. The endpoint varies between services in different regions. It can be obtained from Regions and Endpoints. For details about Message & SMS endpoints, see Obtaining an Endpoint. |
resource-path |
Resource path, that is, API access path. Obtain the path from the URI of an API. For example, the resource-path of the API for obtaining a user token is /v3/auth/tokens. |
query-string |
(Optional) Query parameter. Ensure that a question mark (?) is included in front of each query parameter that is in the format of Parameter name=Parameter value. For example, ?limit=10 indicates that a maximum of 10 data records will be queried. |
For example, to obtain an IAM token in the CN-Hong Kong region, obtain the endpoint of IAM (iam.ap-southeast-1.myhuaweicloud.com) for this region and the resource-path (/v3/auth/tokens) in the URI of the API used to obtain a user token. Then, construct the URI as follows:

To simplify the URI display in this document, each API is provided only with a resource path and a request method. The URI-scheme of all APIs is HTTPS, and the endpoints of all APIs in the same region are identical.
Method
HTTP defines the following request methods that can be used to send a request to the server.
Method |
Description |
---|---|
GET |
Requests a server to return specified resources. |
PUT |
Requests a server to update specified resources. |
POST |
Requests a server to add resources or perform a special operation. |
DELETE |
Requests the server to delete specified resources, for example, an object. |
HEAD |
Requests a server for resource header. |
PATCH |
Requests a server to update part of specified resources. If the requested resource does not exist, the server may create a resource using the PATCH method. |
In the case of the API used to obtain a user token, the request method is POST. The request is as follows:
POST https://iam.ap-southeast-1.myhuaweicloud.com/v3/auth/tokens
Request Header
You can also add additional header fields to a request, such as the fields required by a specified URI or HTTP method. For example, to request for the authentication information, add Content-Type, which specifies the request body type.
For details about common request headers, see Table 1.
Parameter |
Description |
Mandatory |
Example |
---|---|---|---|
Host |
Server information of the resource being requested. The value can be obtained from the URL of the service API. The value is in the format of Hostname:Port number. If the port number is not specified, the default port is used. The default port number for HTTPS is 443. |
No This parameter is mandatory for AK/SK authentication. |
code.test.com or code.test.com:443 |
Content-Type |
Message body type or format. The default value application/json is recommended. Other values of this field will be provided for specific APIs if any. |
Yes |
application/json |
Content-Length |
Length of a request body, in bytes. |
No |
3495 |
X-Project-Id |
Project ID. Obtain it by referring to Obtaining a Project ID. |
No This field is mandatory for requests that use AK/SK authentication in the Dedicated Cloud (DeC) scenario or multi-project scenario. |
e9993fc787d94b6c886cbaa340f9c0f4 |
X-Auth-Token |
User token. The user token is a response to the API used to obtain a user token. This API is the only one that does not require authentication. After the request is processed, the value of X-Subject-Token in the response header is the token value. |
No This parameter is mandatory for token authentication. |
The following is part of an example token: MIIPAgYJKoZIhvcNAQcCo...ggg1BBIINPXsidG9rZ |
The API used to obtain a user token does not require authentication. Therefore, only the Content-Type field needs to be added to requests for calling the API. An example of such requests is as follows:
POST https://iam.ap-southeast-1.myhuaweicloud.com/v3/auth/tokens Content-Type: application/json
(Optional) Request Body
The request body is optional. A request body is often sent in a structured format (for example, JSON or XML) as defined in the Content-Type header field. If the request body contains full-width characters, these characters must be coded in UTF-8.
Request bodies vary depending on APIs. Some APIs do not require a request body, such as the APIs requested using the GET and DELETE methods.
In the case of the API used to obtain a user token, the request parameters and parameter description can be obtained from the API request. The following provides an example request with a body included. Replace username, ******** (login password), domainname (account name), and xxxxxxxxxxxxxxxxxx (project name, for example, ap-southeast-1) with the actual values. For details about how to obtain the values, see Obtaining Account, IAM User, Group, Project, Region, and Agency Information.
The scope parameter specifies where a token takes effect. You can set scope to an account or a project under an account. In the following example, the token takes effect only for the resources in a specified project. For details, see Obtaining a User Token.
POST https://iam.cn-north-1.myhuaweicloud.com/v3/auth/tokens Content-Type: application/json { "auth": { "identity": { "methods": [ "password" ], "password": { "user": { "name": "username", "password": "********", "domain": { "name": "domainname" } } } }, "scope": { "project": { "name": "xxxxxxxxxxxxxxxxxx" } } } }
If all data required for the API request is available, you can send the request to call an API through curl, Postman, or coding. In the response to the API used to obtain a user token, x-subject-token is the target user token. You can use this token to authenticate the calling of other APIs.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot