When I try to connect to oauth2.0 with the Instagram API, I get a 400 - Bad Result back from api.instagram.com. Why?
<p>Here is my code in golang to connect to the instagram api</p>

<pre><code>if resp, err := http.PostForm("https://api.instagram.com/oauth/access_token", url.Values{"client_secret": {appSecret}, "grant_type": {"authorization_code"},
        "redirect_uri": {redirectUri}, "client_id": {appId}, "code": {code},
    }); err == nil {
        log.Info("%s", resp)
    } else {
        return 500, ctr.ErrorResponse(500, err.Error())
    }
</code></pre>

<p>and when I print out my response, I get this</p>

<pre><code>&amp;{400 Bad Request %!s(int=400) HTTP/2.0 %!s(int=2) %!s(int=0) map[Content-Length:[114] Expires:[Sat, 01 Jan 2000 00:00:00 GMT] Vary:[Cookie, Accept-Language] Pragma:[no-cache] Cache-Control:[private, no-cache, no-store, must-revalidate] Set-Cookie:[csrftoken=gUnoNsIbM8edetUJO126sp28WZmC1BuO; expires=Mon, 10-Jul-2017 16:45:38 GMT; Max-Age=31449600; Path=/] Content-Language:[en] Date:[Mon, 11 Jul 2016 16:45:38 GMT] Content-Type:[application/json]] {%!s(*http.http2clientStream=&amp;{0xc8201a6f20 0xc82017e380 1 0xc820a26b40 {{0 0} {0xc820d12160 {0 &lt;nil&gt; &lt;nil&gt;} 0 859544035736} 0xc82022e3f0 0xc82000a0e0 &lt;nil&gt; &lt;nil&gt; 0x1f3760} true {10485760 0xc8201a6f68} {4194190 0xc8201a6f78} 114 &lt;nil&gt; 0xc82000b280 0xc820a26ba0 &lt;nil&gt; 0xc820a26c00 true false map[] 0xc820dc6078})} %!s(int64=114) [] %!s(bool=false) map[] %!s(*http.Request=&amp;{POST 0xc82040a180 HTTP/1.1 1 1 map[Content-Type:[application/x-www-form-urlencoded]] {0xc82043b820} 234 [] false api.instagram.com map[] map[] &lt;nil&gt; map[]   &lt;nil&gt; &lt;nil&gt;}) %!s(*tls.ConnectionState=&amp;{771 true false 49199 h2 true  [0xc8201fcd80 0xc8201fd200] [[0xc8201fcd80 0xc8201fd200 0xc820b28900]] [] [] [203 149 65 158 231 245 216 167 215 32 166 255]})}
</code></pre>

<p>What's going on and how can I fix it?</p>