How to post data to a Keycloak required action using Postman/JMeter?

I have a custom OTP required action, it is presented to every new user after they finished the registration. Now I need to perform a load test on this required action using Postman/JMeter. One thing I noticed from the browser is that when I submit an OTP through browser, Keycloak actually performs a POST request to endpoint https://{BASE_URL}/auth/realms/{REALM_NAME}/login-actions/required-action?session_code={SESSION_CODE}&execution=required-action-custom-otp&client_id=myApp&tab_id={TAB_ID} and Keycloak sends the OTP data as the body request.

But so far I could not find a way to use those information to POST the OTP data using Postman/JMeter and unable to find the documentation for this case. What can I do to perform the load test using Postman/JMeter?

I’m not sure if this is what you are looking for but I also had to authenticate a client using OTP in our app.
the solution was to add “totp” parameter as part of the requests when getting the user access token

this is a snapshot of the code in c#

      public IRestResponse GetOpenConnectId(string user, string pass, string realm, int? TwoFaCode = null)
          var client = new RestClient($"http://localhost:8080/auth/realms/{realm}/protocol/openid-connect/token");
          client.Timeout = -1;

          var request = new RestRequest(Method.POST);
          request.AddHeader("Content-Type", "application/x-www-form-urlencoded");
          request.AddParameter("grant_type", "password");
          request.AddParameter("client_id", "admin-cli");
          request.AddParameter("username", user);
          request.AddParameter("password", pass);
          if (TwoFaCode.HasValue)
              request.AddParameter("totp", TwoFaCode.Value);

          IRestResponse response = client.Execute(request);

          return response;

Not sure Id this code works since this was a long time ago but that was the general idea.
if a user is configured to use OTP - he\she should enter this information in the same form where they enter user name and password and then you need to add this data to the request

Hi @amir thank you for the reply. The mechanism I have is that the user will be presented in different OTP page, initially the user will have to request an OTP and Keycloak will generate the OTP and send it to Whatsapp number of the user via third party Whatsapp API provider. So it seems that I won’t be able to access a Keycloak endpoint for sending OTP as you do.