跳到主内容

Send SMS with Alibaba Cloud

This guide explains how to send the verification codes of Casdoor by SMS through the SMS service of Alibaba Cloud.


Learning outcomes​

  • Get an AccessKey, a signature, and a template code from Alibaba Cloud.
  • Add Alibaba Cloud as an SMS provider in Casdoor and test it.

What you need​

  • An Alibaba Cloud account with the SMS service
  • Administrator access to the Casdoor admin console

Get the credentials​

  1. In the Alibaba Cloud console, create or copy an AccessKey ID and AccessKey Secret.

    SMS service in the Alibaba Cloud console

    AccessKey of Alibaba Cloud

  2. In the console of the SMS service, configure a signature.

    Signature in the SMS console

  3. Create or select an SMS template and copy its code.

    Template code in the SMS console

Add the provider in Casdoor​

  1. In the Casdoor admin console, go to Identity > Providers and add a provider.

  2. Set Category to SMS and Type to Aliyun SMS.

  3. Fill in the fields:

    字段Alibaba Cloud必填
    Client IDAccessKey ID是
    Client secretAccessKey Secret是
    Sign NameSignature是
    Template code模板代码是

    Alibaba Cloud SMS provider in Casdoor

  4. Save the provider.

Verify the result​

Enter a phone number in SMS Test and send a test message.

See also​