How to solve error 49 in Pardot (api version 4) after receiving an API_Key and User_key

1k views Asked by At

after sending callout for login i get an api_key "POST https://pi.pardot.com/api/login/version/4 *email=&password=&user_key=" *setting them as parameters with urlencode

getting the:

but when sending a callout to create a list or any other operation i receive "POST https://pi.pardot.com/api/List/version/4/do/create *api_key=&user_key=" *setting them as parameters with urlencode

error 49 on "access denied"

Are there any configurations required to enable api callout to my account or to my user at pardot?

1

There are 1 answers

0
Sayse On

You're getting this error because sending requests with authorization in the query parameters is being deprecated.

Support for passing credentials via querystring is deprecated and will be forbidden in a future version of the API. Please update your API client as soon as possible.

You must now provide the parameters in an authorization header

Authorization: Pardot api_key=<your_api_key>, user_key=<your_user_key>