Google in-app-purchases subscriptions return error : "invalid value"

68 Views Asked by At

I need to check the monthly renewals of user subscriptions but I keep getting the following error when querying:

{
    "error": {
        "code": 400,
        "message": "Invalid Value",
        "errors": [
            {
                "message": "Invalid Value",
                "domain": "global",
                "reason": "invalid"
            }
        ]
    }
}

I checked some possible values ​​that could be wrong. Using the androidpublisher api I can consult information about which subscriptions I have available, which in my understanding means that I have the following correct values: 1-access token,refresh token,scope 2-package Name 3-subscription ID

example:https://androidpublisher.googleapis.com/androidpublisher/v3/applications/test.test.test/subscriptions/123456789 (return correct information)

Some errors that I may have are the use of an old endpoint (which I think is unlikely since I tested with 1-several endpoints that I found on the internet over the course of weeks ...but for now i trying with these) https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/purchases/subscriptions/{subscriptionId}/tokens/{token} OR https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/purchases/subscriptionsv2/tokens/{token}

2-The purchase token, (something like "GPA.11111-1111-11111-11111") could for some reason be invalid information.

an example of how I'm assembling the request in case of bad formatting is this... a curl version of what I'm doing;

curl -H "Authorization: Bearer ACCESS_TOKEN" https://androidpublisher.googleapis.com/androidpublisher/v3/applications/ab.abc.abcde/purchases/subscriptions/subscriptionExample/tokens/GPA.123123-1233-1233-12323

0

There are 0 best solutions below