pardot / api-docs

29 stars 30 forks source link

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

Open ndlang opened 5 years ago

ndlang commented 5 years ago

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=&api_key=&format=json&fields=created_at,id,name,updated_at&id_greater_than=0&sort_by=id&sort_order=ascending

creuzerm commented 5 years ago

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={}, user_key={}"));