cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Help porting over from Postman to Workato

rharkness
Deputy Chef I
Deputy Chef I

Using Postman, I have successfully retrived a bearer token and connected to the endpoints provided to me by the client.  
I am not having success taking this functioning logic and recreating it in Workato using the HTTP connector.
What I'm not sure about is whether or not my issue is that the client is using a username/password to authenticate the token endpoint and it appears in order to use a bearer token I must use one of the OATH HTTP options

Anyone have any luck retrieving a bearer token with just an username and password?
This may or may not matter, but the endpoints I'm connecting to require the token to be passed in the header

14 REPLIES 14

gary1
Star Chef I
Star Chef I

I've been down this road more times than I could count and it can really be a struggle. The good news is I've always been able to find a way to authenticate using the HTTP connector, it just takes a lot of testing and a little voodoo to land on the right config.

A lot of times OAuth is implemented incorrectly on the client side, so using standard OAuth doesn't work and you need to be creative with Workato's custom auth options, or (eek) go with no auth on the connection and authenticate directly in the body of the call itself.

I can't offer much more direct help without getting more information about what the endpoint is expecting, but if you can provide some details I'll try.

It would be great if Workato could support a cURL import like Postman. 

I'm not afraid to admit this stuff is not my area of expertise.  I'm an old school C++ / Java developer haha
I have two of these HTTP connectors I have to get working.  One uses a username / password to authenticate to hit the token endpoint and another that uses OATH2.0
The one with the username/password I am at a loss to get working

The other one I get a "HTTP OAuth connection is no longer valid" error message when I try to run my stop hitting the data endpoint

I was trying to figure out how to do the authenticate directly in the body of the call, but I cannot figure out that syntax since I'm not able to find a way to export out the body from Postman in JSON since it's configured as x-www-form-urlencoded

I appologize if I'm not giving the right info.  I'm learning as I go here

I'm a pastry chef but we'll figure this out.

Based on what you're saying, try this:

  1. Make a new HTTP action
  2. Make a new connection and select "None" as the authentication type
  3. In the HTTP action, click "set up manually" at the bottom
  4. Set the Method to POST
  5. Set the Request Content Type to URL Encoded Form
  6. Expand Request Body
  7. Click Add Form Data

This will imitate how form-encoded data is entered in Postman, so now you should just have to copy it over.

You should also set the Response Content Type correctly. I'm guessing it's a JSON response, but you know best here.

It's probably easiest to test this in an isolated recipe first.

Once you get this far, let me know if it runs or crashes. If it crashes, what's the error message?

OK!  Progress.  Following your steps I was able to create an HTTP request to retrieve the bearer token. 

Is my assumption correct that my recipe will need to have a HTTP request to get the token, then another HTTP request to hit the endpoint passing that token?

Workato did give me a warning that it is detecting sensitive information, but I'm not sure how else to make this work without doing it this way ๐Ÿ˜ž