0

I'm trying to record a LoadRunner script for a REST API POST call that generates a token.

All the information I have is username:AAABBB, password:AAABBB & URL:https://blahblah/oauth/token?grant_type=client_credentials&scope=blahblah/upload

I'm successfully able to make the call using Postman. When I try to record in LoadRunner; I have tried Design>Insert Step> REST API. Then give URL. In the header option, I add 2 headers and values, the Username and Password. In the body I'm selecting application/x-www-form-urlencoded, and adding in the Key field "Content-Type" and Value field "application/x-www-form-urlencoded".

I'm getting error

{
  "code":"invalid_credentials",
  "message":"Client not authorized due to Invalid credentials",
  "errors":[
    {
      "field":"credentials",
      "message":"undefined"

Can someone help in recording it properly in LoadRunner?

1 Answers1

0

You apparently did not record this, you added a step.

Start a recording session. Proxy mode. External application. Record all headers.

Set your application to use the recording proxy port number. It might be easier to do this on two machines, with your copy of Postman using the proxy port for the loadrunner proxy recorder on a second machine.

James Pulley
  • 5,606
  • 1
  • 14
  • 14