Discussions

Ask a Question
Back to All

Found error in makePurchase() AdaptyResult.Error callback.

Hi Adapty Team,

I hope this message finds you well.

System: Android
Adapty SDK Version: 2.9.1

Issue Description:
I have meticulously followed all the steps to set up my Adapty account, including configuring the paywall, placement, and access level. However, I'm encountering an issue when using the .makePurchase() method. The purchase flow launches successfully with the specified paywall (retrieved using .getPaywall()), but upon a successful purchase, I'm encountering an error in the callback with the AdaptyResult.Error listener.

I would appreciate your assistance in resolving this matter.

  • Error :

<HttpError 401 when requesting https://androidpublisher.googleapis.com/androidpublisher/v3/applications/com.bg.socialcardmaker/purchases/subscriptionsv2/tokens/ejgnbfhndepbmbgpoohmhkbl.AO-J1OxYk4rWpQSk_ymW5fYz5BCdYwRcFblIRVW5wRoeo_ElNzNXVSH51of5y4c8z53GCoK5st5rTqsFF3TZNFNvv76lH5Cx_4lBZvvuc0tNP4gxmtk2lOo?alt=json returned "The current user has insufficient permissions to perform the requested operation.". Details: "[{'message': 'The current user has insufficient permissions to perform the requested operation.', 'domain': 'androidpublisher', 'reason': 'permissionDenied'}]">

========================

  • After opening the given Link on the browser :

{ "error": { "code": 401, "message": "Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.", "errors": [ { "message": "Login Required.", "domain": "global", "reason": "required", "location": "Authorization", "locationType": "header" } ], "status": "UNAUTHENTICATED", "details": [ { "@type": "type.googleapis.com/google.rpc.ErrorInfo", "reason": "CREDENTIALS_MISSING", "domain": "googleapis.com", "metadata": { "method": "androidpublisher.SubscriptionPurchasesV2Service.Get", "service": "androidpublisher.googleapis.com" } } ] } }