I am trying to make a request to the google to verify my IAP purchase but I keep getting the error
Invalid Value at Gaxios._request (/srv/node_modules/googleapis-
Maybe you want to try initializing the Google API like this:
const playDeveloperApiClient = google.androidpublisher('v3');
And add auth
to:
const subscription = await playDeveloperApiClient.purchases.subscriptions.get({
auth: authClient,
packageName: packageName,
subscriptionId: purchase.id,
token: purchase.token
});
For the purchase.id
I find it odd that you are using a number for the Id, ideally you would want to put a string as I mentioned in the comments, just in case, it should be the Product ID in your Subscriptions section in the Play Console as highlighted in the picture below: