400 bad request error when exact POST in docs for refresh_token with Google OAuth2.0
<p>I believe I am running the exact POST request in the OAuth docs ( with my credentials ), but I'm getting a 400 error. I was getting a 404 error, but then reset my client_secret and started using the new client_secret and am now getting a bad request error. Any ideas what I am doing wrong?</p>

<pre><code>$.ajax({
    url:'https://www.googleapis.com/oauth2/v4/token',
    data:{
    'code':getParameterByName('code'),
        'client_id':'',
        'client_secret':'',
        'redirect_uri':encodeURI(url+'?mail=tokened'),
        'grant_type':'authorization_code'
    },
    dataType:'json',
    method:'POST',
    success:function(response){console.log(response);}});
</code></pre>