title: Inapppurchases: get api query failed "code":400,"message":"Invalid Value" "code":500,"message":null
body: <p>I get access_token by this way :<a href="https://developers.google.com/android-publisher/authorization" rel="nofollow">https://developers.google.com/android-publisher/authorization</a></p>
  
  <p>1.use google account allow acess get code</p>
  
  <p>2.use code to get refresh_token</p>
  
  <p>3.use refresh_token get access_token</p>
  
  <p>when use this api</p>
  
  <pre><code>$url_purchase = "https://www.googleapis.com/androidpublisher/v1.1/applications".
                  "/$packageName/inapp/$productId/purchases/$token?access_token=".
                  $return_data-&gt;access_token;
  $return_purchase = http_get($url_purchase);
  </code></pre>
  
  <p>some billing return</p>
  
  <pre><code>{"error":{"code":500,"message":null}}
  </code></pre>
  
  <p>some billing return</p>
  
  <pre><code>{"error":{"errors":[{"domain":"global","reason":"invalid","message":"Invalid Value"}],"code":400,"message":"Invalid Value"}}
  </code></pre>
  
  <p>but some billing can success return</p>
  
  <pre><code>{"kind":"androidpublisher#inappPurchase","purchaseTime":"1395035642794","purchaseState":0,"consumptionState":1}
  </code></pre>
  
  <p>I think the access_token is right, why some billing failed . someone can help me ?thanks very much.</p>
  
  <p>Are there any other way to check billing valid on the server?</p>