Invalid grant_type parameter or parameter missing

1,285 views
Skip to first unread message

cjker...@gmail.com

unread,
May 7, 2013, 8:44:59 AM5/7/13
to mailchimp-...@googlegroups.com
I'm doing the OAuth dance and have made it to the step where I must POST to https://login.mailchimp.com/oauth2/token with the code that I received from the first step.

The url that I POST to is, I believe, valid;

code=CODE_FROM_STEP_ONE
&client_secret=CLIENT_SECRET
&grant_type=authorization_code
&client_id=CLIENT_ID
&redirect_uri=http%3A%2F%2F127.0.0.1%3A5000%2Foauth_success

but I receive this error.

{u'error_description': u'Invalid grant_type parameter or parameter missing', u'error': u'invalid_request'}

I'm sending the content type 'application/x-www-form-urlencoded', and have tried ordering the query parameters to no avail.

jesse

unread,
May 7, 2013, 8:52:11 AM5/7/13
to mailchimp-...@googlegroups.com
Looks like you're putting all of the parameters in the query string instead of actually POSTing them.


jesse

k

unread,
May 7, 2013, 9:09:39 AM5/7/13
to mailchimp-...@googlegroups.com
Hi jesse - yup, that was it *blushes*. Thanks for your help!
Reply all
Reply to author
Forward
0 new messages