Configuring an SMS Gateway to Send Messages
Scenarios
To send SMS messages through Internet applications such as websites and apps, your bastion host system mush have an SMS gateway configured. The gateway processes the message content and forwards it to the carrier's Short Message Service Center (SMSC), which then delivers the messages to recipients' mobile phones. Your bastion host system will need to send SMS messages in the following scenarios:
- SMS verification is configured for login. For details, see Configuring SMS Login Verification.
- SMS verification is required for password resetting. For details, see Resetting Passwords on the Web Login Page.
- SMS messages are sent to notify users of system alarms. For details, see Configuring Alarm Notification Methods.
Supported SMS Gateway Types
| Gateway Type | Description | Restriction | |
|---|---|---|---|
| Built-in gateway | - | A built-in gateway of the bastion host system is used to send SMS messages. |
|
| Third-party gateways | SMS gateway | If you have a third-party SMS gateway, you can connect it to your bastion host system and use it to send SMS messages. | - |
| Message & SMS | Message & SMS is a communication service provided by Huawei Cloud in collaboration with major carriers and channels worldwide. Enterprises can call APIs or use Group SMS Assistant to send verification code and notification SMSs. If you have enabled Message & SMS, you can connect it to a bastion host system and use it to send SMS messages. | If the gateway becomes invalid, the built-in gateway automatically takes over the job. | |
| Telecom SMS gateway | If you have a telecom SMS gateway, you can connect it to your bastion host system and use it to send SMS messages. | - | |
Prerequisites
The role you belong to has the management permission for the System module. For details about how to check the permissions of each role, see Role.
Configuring an SMS Gateway
- Log in to your bastion host system.
- In the navigation pane on the left, choose System > System Config > Outgoing.
- In the SMS API area, click Edit.
- Configure SMS gateway parameters.
- For details about the built-in SMS gateway, see Table 2.
- For details about the custom SMS gateway, see Table 3.
- For details about the custom message & SMS gateway, see Table 4.
- For details about the custom telecommunication SMS gateway, see Table 5.
Table 2 Parameters for configuring the built-in SMS gateway Parameter
Description
Type
Select Built-in.
Mobile
Enter a valid mobile number and click Send a test message to mobile to check whether the SMS gateway is successfully configured.
Table 3 Parameters for configuring a third-party SMS gateway Parameter
Description
Type
Select Third-party.
SMS Conf
Select SMS Gateway.
Method
Select a request method. The options are POST and GET.
URL
Enter a universal URL or a URL containing parameters. Example: http://www.example.com/
Do not enter MD5-encrypted URLs.
HTTP Header
HTTP request header. Use colons (:) to separate the name and value of the HTTP request header. Enter only one header in each line.
Only HTTP and HTTPS gateways are supported.
API Params
Enter the SMS gateway API parameters. This parameter is available only when Method is set to POST.
The keywords $MOBILE and $TEXT will be replaced with the mobile number and SMS message content, respectively. Example: id=username&key=password&mobile=$MOBILE&text=$TEXT
Encode
Select an encoding format. UTF-8, Big5 and GB18030 are supported.
Mobile
Enter a valid mobile number and click Send a test message to mobile to check whether the SMS gateway is successfully configured.
Table 4 Parameters for configuring a Message&SMS gateway Parameter
Description
Type
Select Third-party.
SMS Conf
Select Message&SMS
Domestic SMS gateway
APP_Key
Enter the APP_Key value of the Chinese SMS application you have applied for.
APP_Secret
Enter the APP_Secret value of the Chinese SMS application you have applied for.
APP Access URL
Enter the access URL of the Chinese SMS application you have applied for.
Sender
Enter the channel number of the Chinese SMS signature you have applied for.
Template ID
Enter the ID of the Chinese SMS template you have applied for.
The template should be read like this "Your verification code: ${1} (valid within ${2} minutes). To ensure account security, do not provide this verification code to anyone." For details, see "Applying for a Chinese SMS Template."
Template ID1
Custom SMS template for sending system alarms.
Domestic Number
Enter a valid Chinese mainland mobile number and click Send a test message to mobile to check whether the SMS gateway is successfully configured.
International SMS gateway
APP_Key
Enter the APP_Key value of the international SMS application (global SMS application or Chinese mainland SMS application) you have applied for.
APP_Secret
Enter the APP_Secret value of the international SMS application (global SMS application or Chinese mainland SMS application) you have applied for.
Application Access URL
Enter the application access URL of the international SMS application (global SMS application or Chinese mainland SMS application) you have applied for.
Sender
Enter the channel number of the international SMS signature (global SMS signature or Chinese mainland SMS signature) you have applied for.
Template ID
Enter the ID of the international SMS template (global SMS template or Chinese mainland SMS template) you have applied for.
The template should be read like this "Your verification code: ${1} (valid within ${2} minutes). To ensure account security, do not provide this verification code to anyone." For details, see Applying for an International SMS Template.
Template ID1
Custom SMS template for sending system alarms.
International Number
Enter a valid international mobile number and click Send a test message to mobile to check whether the SMS gateway is successfully configured.
Table 5 Parameters for configuring a third-party telecommunication SMS gateway Parameter
Description
Type
Select Third-party.
SMS Conf
Select CT SMS Gateway.
URL
URL of the SMS API. You can enter a universal URL or a URL containing parameters. Example: https://xxx.com/api/webservice
Company ID
Enter the company ID of the telecom gateway.
User ID
Enter the user account of the telecom gateway.
User password
Enter the user password of the telecom gateway.
Signature
Enter the signature information of the telecom gateway.
Mobile
Enter a valid mobile number and click Send a test message to mobile to check whether the SMS gateway is successfully configured.
- Click OK.
What is your overall rating for this page?
Thank 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