Passer au contenu principal

Send SMS with Alibaba Cloud PNVS

This guide explains how to send the verification codes of Casdoor through the Phone Number Verification Service (PNVS) of Alibaba Cloud.


Learning outcomes​

  • Get an AccessKey with access to PNVS.
  • Add Alibaba Cloud PNVS as an SMS provider in Casdoor and test it.

What you need​

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

Get the credentials​

In the RAM console of Alibaba Cloud, create or copy an AccessKey ID and AccessKey Secret of an account that may use the dypnsapi service.

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 Alibaba Cloud PNVS SMS.

  3. Fill in the fields:

    Casdoor fieldAlibaba CloudRequis
    ID clientAccessKey IDOui
    Client secretAccessKey SecretOui
  4. The provider uses the region cn-hangzhou by default. If your PNVS service is in another region, set the region on the provider.

  5. Save the provider.

Verify the result​

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

See also​