I am attempting to integrate MailChimp into our application through
the use of API. I am having an issue with part of the OAuth2
process. I am referencing the documentation at
http://apidocs.mailchimp.com/oauth2/.
At this location there is a section titled "Full Flow with request/
response data". I am at Step 4 - "Your application must make an out-
of-band request to the access_token_uri using the "code" returned".
I am using the HttpWebRequest objects in C# (.NET 4 Framework) to make
this request. I continually get the HTTP Response "400 Bad Request".
I have been able to capture the actual HTTP request being made at this
point (see below with some keys modified slightly).
Could someone provide me some insight as to what is "bad" with this
request?
Thanks,
Tracy
Request
===============================================
POST /oauth2/token HTTP/1.1
User-Agent: oauth2-draft-v10
Accept: application/json
Content-Type: application/x-www-form-urlencoded
Host:
login.mailchimp.com
Content-Length: 208
Connection: Keep-Alive
grant_type=authorization_code&client_id=xxxxxxxxxxxx&client_secret=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&code=b96b1401820d270e56228dd977c66c2a&redirect_uri=http
%3a%2f%2f127.0.0.1%3a63305%2fMailChimp-Authorize.aspx
==============================================