I am trying to use OAUTH2 flow in the HTTP request action of workflows. The client’s token URL requires basic authentication + additional authentication (username and password) in the body. The HTTP action does not provide an ability to send the body for the token request.
Attached is the postman request of a successful token response. The request requires basic auth + another set of userid and password in the body.
The HTTP action does not provide option to send the body for a token request.
Yes. The custom Auth provides a way to add custom entries to header of the main request. It does not have an option to provide a token URL and retreive the access token to be added to the subsequent request.
@nileshnikalje Seems “Client credentials” is the only grant type supported. In your case its “password”. Can you try giving username and password in the place of clientId and clientSecet and see if it works? Just a thought
Using custom auth provides the most flexibility, you can define custom headers/custom body etc. you can also reference the generated token by Bearer {{$.hTTPRequest.body.access_token}} in subsequent calls
I do believe if you have it working in postman you can do it in workflow, in 1 or 2 steps.
The custom auth does not provide a way to define custom body. we can just add headers. The token url at the client side requires basic auth in header and an additional userid/password in the body.
I was able to achieve this using two HTTP request actions. First one to get the token using basic auth and passing additional authentication in the body. The second request used custom auth and passing the token in the headers of the request.