Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm connecting to a rest API. The API provider previously accepted Login Requests to return an API key by passing the credentials as a query string in the URL.
This was working fine for me by using
However, the API provider has now deprecated this method and requires the credentials to be passed in the body, e.g. this is the API Spec.
Sample POST Request
POST https://pi.pardot.com/api/login/version/3 HTTP/1.1 email=<email>&password=<password>&user_key=<user_key>
Request Parameters
Parameter Required Description
X | The email address of your user account | |
password | X | The password of your user account |
user_key | X | The 32-character hexadecimal user key for your user account |
If authentication was successful, a 32-character hexadecimal API key will be returned in the following format:
<rsp stat="ok" version="1.0"> <api_key>5a1698a233e73d7c8ccd60d775fbc68a</api_key> </rsp>
Otherwise, the response will contain the following:
<rsp stat="fail" version="1.0"> <err code="15">Login failed</err> </rsp>
I'm unable to get this to work. My revised job is as below. I'm using a tFixedFlow input to pass the credentials via a tMap into the string field of the tRest (I will used context variables to hold the relevant credentials in due course). However, I can seem to get this to work, what am I doing wrong? I know my credentials are good as I can get them to work via SOAP UI. I'm assuming I have something wrong with the syntax of the string I'm passing through. Of course because it's a logon and for security reasons the response from the API doesn't provide much clue as to what the problem is.
In the end the solution turned out to be so (annoyingly) simple!
I just had to change the Content Type Dropdown from JSON to FORM
I ended up using the tFileFetch to make the connection. The response was saved to a cache which I parsed to get the api key.
In the end the solution turned out to be so (annoyingly) simple!
I just had to change the Content Type Dropdown from JSON to FORM
Hi guys,
I am facing a similar problem (at least I think so), with a banking API that I call to get some customer information. The whole API works with OAuth 2.0.
The process is as follows: first I call an authorization URL of the API (GET request with my Client_ID, Redirect URI and response_type = "code"), I then get redirected to a login page, where the user (whose info I want) has to enter his/her credentials (Branch, account id, subaccount id, pin). Once this is done, the user grants me access to its data and I get the token. My problem is that I dont know how to handle the step after the GET request. The response I get from calling the authorization URL is HTML, but I have no idea how to parse the user credentials into it. Itried another tRestClient, that takes in the response of the first tRestClient (which is a redirect to the user login site) and makes a POST call the user credentials (see screenshot). However, I am getting a 403 in the 2. tRestClient. Do you have any idea how to work with the response of the first tRestClient? Can I save it somehow? Any held would be greatly appreciated!