Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New API credentials are still required in query string #175

Open
asanokhin opened this issue Mar 18, 2019 · 9 comments
Open

New API credentials are still required in query string #175

asanokhin opened this issue Mar 18, 2019 · 9 comments

Comments

@asanokhin
Copy link

asanokhin commented Mar 18, 2019

According to new documentation at http://developer.pardot.com/ api_key and user_key should not be passed via URL query string but rather via body or header.
However no new requirements are supported while deprecated query string is still working.

As we understand before query string is deprecated new feature should work.

We tested new api via postman to verify those new requirement vs old (deprecated) ones.
Tested with Postman

  1. Authentication passing 3 params with query works (gives api key)
  2. Authentication passing 3 params in header doesn’t work (get,st)
  3. Authentication passing 3 params in body doesn’t work ( post)
  4. Passing in query api and user keys works (returns prospect)
  5. Passing in body api and user keys fails with "err_code": 1, "err": "Invalid API key or user key" (post)
  6. Passing in header api and user keys fails with "err_code": 1, "err": "Invalid API key or user key" (get, post)
@creuzerm
Copy link

Did you get this sorted out over the transition?

It looks like the server was a bit inconsistent in it's treatment of various logins during the transition. It looks like not everybody has been shut down yet for logging in yet if they have been using the old depreciated login. So things may work unchanged in some accounts still and not work in other accounts.

@asanokhin
Copy link
Author

I think nothing has changed. We are fine if it is not going to change. But if it is backward incompatible, we need to know when it works differently, timing and transition.

@brichorspr
Copy link

I am having the same problem using Postman. Passing in header api and user keys fails with "err_code": 1, "err": "Invalid API key or user key" (get, post). Are there any updates?

@asanokhin
Copy link
Author

I am verifying from time to time, but for what it worth, api didn't change. I hope, there will be reliable signal to transition to new api if ever needed.

@adamerstelle
Copy link

adamerstelle commented Jul 12, 2019

Using https://reqbin.com I was able to POST to url https://pi.pardot.com/api/login/version/3 the content (FORM URL Encoded) email=MYPARDOTUSER&password=MYPARDOTPWD&user_key=MYPARDOTKEY and get a valid api_key.

Taking the api_key, then I used a GET request (to read a prospect) using the Custom Authorization header Pardot api_key=APIKEYFROMPREVREQ, user_key=MYPARDOTKEY (noting that the actual header in raw form is: Authorization: Pardot api_key=APIKEYFROMPREVREQ, user_key=MYPARDOTKEY and the request was successful.

@Markj89
Copy link

Markj89 commented Nov 5, 2019

Make sure the Auth, is set to "No Auth" and your Params are empty, unless you want the specific name of the campaign.
Like @adamerstelle said before Add Authorization: Pardot api_key=APIKEYFROMPREVREQ, user_key=MYPARDOTKEY into your Headers tab and you'll get your results.

@danielrlambert3
Copy link

@Markj89 @adamerstelle

I tried your approach in Postman and am encountering some issues.

When I try Authorization: Pardot api_key=APIKEYWASHERE user_key=USERKEYWASHERE, I get the error "Invalid API key or user key". Although I know both are correct.

When I try Authorization: Pardot api_key=APIKEYWASHERE,user_key=USERKEYWASHERE, I get the error "One or more required parameters are missing".
Screen Shot 2020-11-09 at 8 38 22 PM

Screen Shot 2020-11-09 at 8 39 10 PM

Any ideas?

@adamerstelle
Copy link

Hey @danielrlambert3, take a look at our postman collection at https://sercante.com/labs to see working examples. There are test scripts in the Login request that set correct environment variables and should show you the correct path.

Having said that, if you are doing fresh development I would advise you focus your efforts on getting your auth to work via Salesforce SSO instead of a Pardot Only API user. I wrote a blog post here that might help you out: https://thespotforpardot.com/2020/09/23/pardot-api-and-getting-ready-with-salesforce-sso-users/

@danielrlambert3
Copy link

@adamerstelle I can't thank you enough, this is exactly what I was looking for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants