跳到主内容

Send SMS with Azure Communication Services

This guide explains how to send the verification codes of Casdoor by SMS through Azure Communication Services (ACS).


Learning outcomes​

  • Get a token, a phone number, and the endpoint from Azure.
  • Add Azure ACS as an SMS provider in Casdoor and test it.

What you need​

  • An Azure Communication Services resource with a phone number
  • Administrator access to the Casdoor admin console

Get the credentials​

  1. In your Communication Services resource, create a user access token.

    User access token in Azure

  2. Note a phone number that is provisioned in the resource.

    Phone number in Azure

  3. Copy the endpoint URL of the resource.

    Endpoint of the resource

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 Azure ACS.

  3. Fill in the fields:

    Casdoor 字段Azure ACS / 含义必填
    客户端密钥用户访问令牌(通信服务)是
    发送者号码来自通信服务的电话号码是
    提供商Url通信服务端点是
    模板代码消息模板/正文是

    Azure ACS 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​