Want to Integrate Web app in yii2

I have an app on the web with the yii2 framework. I need to authenticate users with OTP via SMS/email using the privacyIdea before login into the app.

So far I have done the following things to meet my requirements:

  1. Setup PrivacyIdea on my local and registered the users with “register” API.
  2. Now I need to send an OTP to the users on SMS/Email for confirmation.
    2.1. I am tried the “/validate/triggerchallenge” API.
    2.2 I also configured an SMS gateway account and created a separate token for “totp and sms”. I have added the users into the respective tokens.
    2.3 while hitting the API “/validate/check” getting error.

How to configure the PrivacyIdea setup so that I can send otp via sms/email to users using the API requests.

Hello and welcome to privacyIDEA.

You did it the right way.
Maybe you are using a wrong PIN. maybe s.th. else.
You should elaborate more on the error, you are getting.

You should note, that you are in challenge mode:

@cornelinux Hi, Is there any example about how to send the OTP via SMS using privacyIdea?