title: Sporadic invalid_request 400 errors connecting to Shopify /admin/oauth/access_token
body: <p>I am using a java raw HTTP client to connect to Shopify API (specifically, using <a href="https://groups.google.com/forum/?fromgroups=#!topic/play-framework/B2_Oj6y3xFk" rel="nofollow">Play Framework with the non-defualt sync driver</a> which is actually the JDK's default driver).</p>
  
  <p>My application usually manages to connect successfully and convert the temporary access token into a permanent one by calling the <code>/admin/oauth/access_token</code> endpoint.</p>
  
  <p>However, sometimes I get this error result from the API:</p>
  
  <pre><code>Generic Error(400)
  {"error":"invalid_request"}
  </code></pre>
  
  <p>I haven't been able to reproduce the issue with my test stores - I've tried installing a fresh store, reinstalling existing stores after uninstalling, I'm not sure why this call sometimes fail and how to debug it. The API call still continues to succeed for some stores using our application.</p>
  
  <p>Some things that I am doing:</p>
  
  <ol>
  <li>Even if the URL of the store is on a custom domain, I'm always using the <code>https://foo.myshopfiy.com/admin/oauth/access_token</code> URL and not the URL of the custom domain, to prevent a redirect.</li>
  <li>I am always using an <code>https</code> URL and never an <code>http</code> one, again to prevent a redirect (we noticed a few issues with redirect with the Java HTTP client, so we aim to have zero redirects)</li>
  <li><a href="https://groups.google.com/forum/?fromgroups=#!msg/shopify-app-discuss/5u-HFDSkXn0/TgoMje90pXAJ" rel="nofollow">A thread</a> I found about this error suggest possible problems with our SSL certificates, however I don't think this is my problem because some requests work for us, and the result of running openssl on our machine does't show any issues.</li>
  </ol>
  
  <p>How should I proceed? Open a support ticket with Shopify?</p>
  
  <p>FYI, I see that this specific problem only started yesterday on Feb 19 2013, so it might be a temporary issue.</p>