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

"err_code": 49 "err": "Access Denied" #181

Open
ndlang opened this issue May 1, 2019 · 1 comment
Open

"err_code": 49 "err": "Access Denied" #181

ndlang opened this issue May 1, 2019 · 1 comment

Comments

@ndlang
Copy link

ndlang commented May 1, 2019

Trying to use postman to test API calls to Pardot but keep getting this error from the title.
Full Error:
{
"@attributes": {
"stat": "fail",
"version": 1,
"err_code": 49
},
"err": "Access Denied"
}

I am able to successfully get an API key from a post call in Postman, but cannot query the data.

URL:
https://pi.pardot.com/api/list/version/3/do/query?user_key=<user_key>&api_key=<api_key>&format=json&fields=created_at,id,name,updated_at&id_greater_than=0&sort_by=id&sort_order=ascending

@creuzerm
Copy link

You are using GET parameters along with the AUTH variables.

This is the new correct behavior of the API by the Pardot server under the new AUTH requirements to my understanding.
http://developer.pardot.com/#using-the-api

An example of how to do this now if the tool is using CURL:
curl_setopt($curl_handle, CURLOPT_HTTPHEADER, array("Authorization: Pardot api_key={<api_key>}, user_key={<user_key>}"));

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

2 participants