Android InApp购买验证使用Google API失败

Android InApp购买验证使用Google API失败,android,api,in-app-purchase,subscription,Android,Api,In App Purchase,Subscription,我对Google Play Android开发者API有问题。 我需要验证托管产品和订阅类型购买的购买,并在验证时授予对服务器上内容的访问权限 我使用Oauth生成一个访问令牌来授权API调用。 我使用androidpublisher.purchases.get来验证订阅类型的购买,并且它可以按预期工作 但是,当我使用androidpublisher.inapppurchases.get验证购买时,返回了一个毫无帮助的错误 { "error": { "errors": [ {

我对Google Play Android开发者API有问题。 我需要验证托管产品和订阅类型购买的购买,并在验证时授予对服务器上内容的访问权限

我使用Oauth生成一个访问令牌来授权API调用。 我使用androidpublisher.purchases.get来验证订阅类型的购买,并且它可以按预期工作

但是,当我使用androidpublisher.inapppurchases.get验证购买时,返回了一个毫无帮助的错误

{
"error": {
  "errors": [
   {
    "domain": "global",
    "reason": "invalid",
    "message": "Invalid Value"
   }
  ],
  "code": 400,
  "message": "Invalid Value"
 }
}
两个API调用都使用来自收据的相同值-packageName、productID、purchaseToken,并使用相同的访问令牌

我被难住了,任何帮助都将不胜感激

编辑1。 这是inapp代码。 工作订阅验证的唯一区别是将/inapp/替换为/subscriptions/

string restAPI = "https://www.googleapis.com/androidpublisher/v1.1/applications/{0}/inapp/{1}/purchases/{2}";
            string url = String.Format(restAPI, APP_PACKAGE, SUBSCRIPTION_ID, PURCHASE_TOKEN);
            string postcontents = string.Format("access_token={0}", HttpUtility.UrlEncode(AUTH_TOKEN));
            string responseFromServer = "";
            url += "?" + postcontents;

            HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(url);
            request.Method = "GET";
            request.UserAgent = "RVGP";
            WebResponse response = request.GetResponse();
            using (Stream responseStream = response.GetResponseStream())
            {
                using (StreamReader reader = new StreamReader(responseStream))
                {
                    responseFromServer = reader.ReadToEnd();
                    reader.Close();
                    responseStream.Close();
                    response.Close();
                }
            }

很多用户都遇到了相同的问题,似乎有一个bug


您能发布您用来拨打这些电话的代码吗?