Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Generating a one-time password by calling an API

Updated on March 15, 2022

You can generate a one-time password by calling an API. Use this method to use a one-time password from an external system or if your application is running on a Pega Platform version earlier than 7.3.

Before you begin: Complete the Configuring multifactor authentication policies procedure.
  1. Create a REST Connector by using the REST integration wizard.

    For more information about how to configure the connector, see Creating a REST integration.

  2. In the Endpoint URL field, enter the authenticate/one-time password web service on your server instance.
    For example: https://localhost:9090/prweb/PRRestService/api/v1/authenticate/otp/email
  3. Select the POST method to invoke the external REST service.
  4. In the Add a REST response dialog box, in the Content type list, select JSON.
  5. For the response, enter the following text:
    {
    "Context": "Test 126",
    "EmailSettings": {
    "CorrespondenceName": "pyDefaultOTPCorr",
    "EmailAccount": "Default",
    "Subject": "OTP New",
    "ToAddress": "[email protected]"
    }
    }
  6. Click Save.
What to do next: Complete the Verifying a one-time password procedure.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us