Mailchimp API login returning “bad request”

2019-06-02 23:38发布

I am trying to sign in, using the mailchimp api, but I am getting StatusCode "400 Bad Request". How can I solve this error?


index.cfm

<cfform action="https://login.mailchimp.com/oauth2/authorize?response_type=code&client_id=462880470696&redirect_uri=http://127.0.0.1:8500/mailchimp/callback.cfm" method="post">
Click Submit Button
<cfinput type="Submit" name="SubmitForm" value="Submit">

callback.cfm

<cfoutput>#URL.code#</cfoutput>
<cfhttp url="https://login.mailchimp.com/oauth2/token" method="post" result="data" redirect="yes" charset="utf-8">
    <cfhttpparam type="Url" name="grant_type" value="authorization_code">
    <cfhttpparam type="Url" name="client_id" value="462880470696">
    <cfhttpparam type="Url" name="client_secret" value="909a7aab6f9b51995c931d2333d1efda">  
    <cfhttpparam type="Url" name="code" value=#URL.code#>
    <cfhttpparam type="Url" name="redirect_uri" value="http://127.0.0.1:8500/mailchimp/callback.cfm">
</cfhttp>
<cfdump var="#data#">

Error: Statuscode 400 Bad Request

0条回答
登录 后发表回答