SMS for Auth0 MFA

Send MFA and one time passwords using your trusted RingCentral business numbers.

Add RingCentral SMS to Auth0
ipaas banner

RingCentral SMS for Auth0 MFA in 3 easy steps

Utilize your RingCentral SMS for Auth0 multi-factor authentication in three easy steps.
Step 1
Create your Auth0 RingCentral App credentials
Create a new private RingCentral app for your Auth0 MFA integration to get your client ID, secret, and JWT access.
Step 2
Create your Auth0 Action using copy and paste code
Use the following guide to work step by step in setting up your Auth0 RingCentral SMS action.
Step 3
Deploy your Auth0 action
Make sure you use your production credentials (client ID, secret, and JWT) and your Auth0 integration is ready to go, just log in to Auth0 to flip the switch.

Add RingCentral SMS to Auth0

Quickly and easily use your trusted RingCentral numbers with Auth0 Actions to enable SMS MFA with this copy and paste code block.
            const RingCentral = require('@ringcentral/sdk').SDK;

exports.onExecuteSendPhoneMessage = async (event, api) => {
    // Setup Connection
    var e = event;
    var rcsdk = new RingCentral({
        'server':       e.secrets.RINGCENTRAL_SERVER,
        'clientId':     e.secrets.RINGCENTRAL_CLIENT_ID,
        'clientSecret': e.secrets.RINGCENTRAL_CLIENT_SECRET,

    // Setup User Auth
    var platform = rcsdk.platform();
        'jwt': e.secrets.RINGCENTRAL_JWT

    // Send MFA upon login success
    platform.on(, function(err){
        async function send_sms() {
            try {
                // Clean numbers (to make sure proper format)
                var cleanToNumber = e.message_options.recipient.replace(/[^+0-9]/, '');
                if (cleanToNumber.substring(0,1) != '+') { cleanToNumber = '+'+cleanToNumber; }
                var cleanFromNumber = e.secrets.RINGCENTRAL_FROM_NUMBER.replace(/[^+0-9]/, '');
                if (cleanFromNumber.substring(0,1) != '+') { cleanToNumber = '+'+cleanToNumber; }

                // Send SMS
                var resp = await'/restapi/v1.0/account/~/extension/~/sms', {
                    from: {'phoneNumber': cleanFromNumber},
                    to: [{'phoneNumber': cleanToNumber}],
                    text: e.message_options.text
                return cb(null, {});
            } catch (err) {
                return cb(new Error(err.message));
Get more than communications
Be part of the RingCentral community.
Be a Game Changer
Learn about our APIs, grow your skills, and get recognized and rewarded with RingCentral gear, conference passes, electronics, and more in our revolutionary Game Changer program.
Developer Forum
Developer Forum
Post your questions in our forum and get help from our developer support team and amazing community.
Professional Services
RingCentral Professional Services
Don't have the time or resources to build your app internally? Our professional services team has you covered.

Loved by over 85,000 developers

Find out why RingCentral is one of the most awarded APIs over the last six years. With this much praise it's hard to stay humble.

Build your first app See our awards