0

I have two devices set for a user in case of Otp generation for Multi Factor Authentication.For Browser, It is asking me to choose the device. I want to achieve same from Rest api. Kindly suggest. Currently i am using below request but 401 unauthorized error is being received.

curl --location --request POST 'http://localhost:8080/auth/realms/master/protocol/openid-connect/token' --header 'Content-Type: application/x-www-form-urlencoded' --header 'Content-Type: application/x-www-form-urlencoded' --header --data-urlencode 'client_id=admin-cli' --data-urlencode 'username=shagun' --data-urlencode 'password=Abc@1234' --data-urlencode 'grant_type=password' --data-urlencode 'totp=823708'

1 Answers1

0

You can use any of the device, the OTP will stay the same. After you have the OTP you can make REST calls and fetch the token. Below is the POSTMAN screen shot :-

enter image description here

Abhishek K
  • 645
  • 1
  • 11
  • 23