title: coinbase oauth2 sometimes failed to renew access token (using refresh token)
body: <p>I am integrating coinbase in an iOS app and I am using Oauth2 to authenticate. I am able to get the access token after going through the usual workflow. I have also taken care to attempt refresh my access token whenever any requests hit a 401 (upon expiration) by calling this: </p>
  
  <p>POST <a href="https://coinbase.com/oauth/token" rel="nofollow">https://coinbase.com/oauth/token</a>
  Data:</p>
  
  <p>grant_type=refresh_token&amp;refresh_token=abcd1234&amp;client_id=theclientid&amp;client_secret=somesecretid </p>
  
  <p>It works for a while but then from time to time, it would fail with a request response: </p>
  
  <pre><code>NSHTTPURLResponse: 0x15eb2730
  { URL: https://coinbase.com/oauth/token } { status code: 401, headers {
  "CF-RAY" = "f67d477aae4052e-YYZ";
  "Cache-Control" = "no-store";
  Connection = "keep-alive";
  "Content-Type" = "application/json; charset=utf-8";
  Date = "Sun, 02 Feb 2014 15:14:14 GMT";
  Pragma = "no-cache";
  Server = "cloudflare-nginx";
  "Set-Cookie" = "__cfduid=&lt;some long alpha-numeric string&gt;; expires=Mon, 23-Dec-2019 23:50:00 GMT; path=/; domain=.coinbase.com; HttpOnly";
  Status = "401 Unauthorized";
  "Strict-Transport-Security" = "max-age=31536000";
  "Transfer-Encoding" = Identity;
  Vary = "Accept-Encoding";
  "Www-Authenticate" = "Bearer realm=\"Doorkeeper\", error=\"invalid_request\", error_description=\"The request is missing a required parameter, includes an unsupported parameter value, or is otherwise malformed.\"";
  "X-Content-Type-Options" = nosniff;
  "X-Frame-Options" = SAMEORIGIN;
  "X-Rack-Cache" = "invalidate, pass";
  "X-Request-Id" = "&lt;some long alpha-numeric string&gt;";
  "X-Runtime" = "0.012066";
  "X-Ua-Compatible" = "IE=Edge,chrome=1";
  } }
  </code></pre>
  
  <p>Has anyone encounter this error before? I have assume the request URL is correct always. I am not sure why it would complained about "missing required parameter" or "unsupported parameter". I havent figured out a pattern of failure yet. Hopefully, someone out there may have seen this before.</p>