Skip to main content

How to enable SMS service

Configuration

Click the profile photo and go to System Configuration > Integration > SMS Service:

Default Supported SMS Service Providers

Tencent Cloud

  1. Enable Tencent Cloud SMS service
  2. Create domestic SMS templates, and configure them in SMS Service Settings after the templates are approved.

Alibaba Cloud

  1. Enable Alibaba Cloud SMS service
  2. Create domestic SMS templates, and configure them in SMS Service Settings after the templates are approved.

Currently, we only support SMS template configuration for verification codes, which satisfy needs such as registering an account via phone number, binding a phone number to an account, and resetting a password. You only need to configure one of the mentioned service providers. If configured all simultaneously, a provider will be randomly chosen when sending verification codes

Additionally, there are some functions that involve sending custom SMS messages, which cannot be standardized. If you need to enable such functions (e.g. the send SMS node in workflows, inviting users to register via phone number, and phone number verification in public forms), you will need to apply for an account with a third-party SMS service provider, and then integrate it independently or customize development by the technical team. Once this mode is activated, the verification code sending channels of Tencent Cloud and Alibaba Cloud in the system configuration will automatically be disabled.

Self Integration

  1. Create the configuration file

    For example: /data/mingdao/script/volume/sms/appextensions.json

    {
    "WebhookUrl": "API address to receive messages", // Required, for example: https://api.domain.com/hooks/NjA0NzdjMDNjMGFjMTE3ZGUwMjRjN2Nl
    "WebhookHeaders": {} // Optional, custom request header parameters
    }

    The format for SMS messages is as follows: (POST application/json)

    {
    "Type": 1,
    "Data": {
    "Mobiles": ["Phone number"], // List of phone numbers to receive messages
    "Message": "SMS content",
    "Signature": "Signature"
    }
    }

The format for voice verification codes is as follows: (POST application/json)

{
"Type": 2,
"Data": {
"Mobile": "Phone number"
"Code": "Verification code"
}
}
  1. Mount the configuration file

    Add the following to the docker-compose.yaml volumes of the microservice application:

    - ./volume/sms/appextensions.json:/usr/local/MDPrivateDeployment/sms/appextensions.json
  2. Restart the service