How to facing Multifactor authentication for web application development


I have faced issues to develop Web application , My organization using mobile authentication for web applications. i dont know how to automate the application. please help.

Hey @ananthitamilmani
To get the OTP code you need sms gateway like twilio or sms2go.
I used it to retrieve OTP code sent via email, robot took code and placed it to the website.
If I remember correctly twilio worked fine but blocked OTP codes from Amazon.
SMS2GO worked without any issues.
but also you can find something else :slight_smile:


Thank you for your suggestion.

Step 1: Setup API Access---->Register and set up your account with the SMS gateway provider (Twilio or SMS2GO).
Obtain your API key and the endpoint URL for retrieving messages.

Step 2: Install Required UiPath Activities
Open your UiPath Studio.
Go to “Manage Packages” and install the UiPath.WebAPI.Activities package if not already installed.
Step 3: Configure the HTTP Request Activity
Drag the HTTP Request activity into your sequence.
In the properties panel, configure the following:
EndPoint: Set this to the API endpoint provided by the SMS gateway service.
Method: Select “GET”.
Headers: Add a header for “Authorization” and provide your API key like “Bearer [Your_API_Key]”.
Step 4: Send the Request and Get the Response
Use the HTTP Request activity to send the request to the SMS service’s API.
Store the response in a variable, typically a string variable named jsonResponse.
Step 5: Deserialize the JSON Response
Drag the Deserialize JSON activity into your sequence after the HTTP Request.
Set the JSONString property to jsonResponse.
Create a variable of type JObject to store the output, let’s call it deserializedResponse.
Step 6: Extract the OTP
Add an Assign activity to extract the OTP from deserializedResponse.

Assuming the JSON has a field named “otp”, assign the OTP to a string variable:

otpCode = deserializedResponse(“messages”)(0)(“otp”).ToString
Step 7: Use the OTP in Your Automation
Use the Type Into activity to input the OTP into the required field on your web application.

Also Azure Communication Services SMS can be the option:

Hello. You might want to try the authentication support we have in UIA.
In our Use Browser activity, you can use the Requires Authentication options. You can then use the Add Connection option and follow the steps. The login session will be saved this way and reused in your future automations. You will need to redo the login steps when your login session expires.

1 Like