mneedham91 / PyPardot4

PyPardot is a wrapper for Version 4 of the Pardot API, written in Python.
MIT License
48 stars 38 forks source link

Pardot change API Auth process, need to switch the auth method to POST #23

Closed crakage closed 6 years ago

crakage commented 6 years ago

Hi Team,

Pardot updated their authentication requirement and prevent the usage of GET. https://github.com/mneedham91/PyPardot4/blob/master/pypardot/client.py

Could you update the authentication function in order to use POST request instead?

More info: http://developer.pardot.com/#authentication

Kind regards David

mneedham91 commented 6 years ago

@crakage Actually, I'm not sure if that's an issue. Check out lines 152-164 of client.py. This a POST request to login route. Everything looks fine to me. Am I missing something?

crakage commented 6 years ago

Hi Matt, Thanks for the update. Weird, I will check again tomorrow ( i am in Europe) and update you.

crakage commented 6 years ago

My bad I check the other wrapper: https://github.com/joshgeller/PyPardot/blob/master/pypardot/client.py posted the issue on the wrong Repository sorry for that

mneedham91 commented 6 years ago

No problem. Thanks for keeping on eye on changes to the API!

berntmelba commented 5 years ago

The original description of this issue left out an important detail regarding supported Pardot API auth process that is relevant to this project. As per notice on http://developer.pardot.com, passing credentials in querystring of any Pardot API request is now deprecated. I see requests.post() calls in this project specifying params= instead of data= for passing parameters which results in parameters being passed in the query string of the URL instead of the body of the request. Please update to pass parameters in the body of the POST request.