Play Billing Library v3 权限被拒绝错误?

时间:2021-06-22 10:56:28

标签: android-studio google-cloud-platform google-cloud-functions google-play play-billing-library

我正在我的 android 项目中使用 google Play Billing Library,但仍然收到 Permission denied 错误我联系了 google play 团队,他们说 api 访问没有问题,可能是错误来自 GCP .. 所以我有添加了许多其他权限来检查 api 是否正常工作,但仍然获得权限拒绝.. Kotlin Android 代码

    FirebaseFunctionsException.Code.PERMISSION_DENIED 

这是Gcp的权限

enter image description here

并且这个操作触发了权限错误 TypeScript Code

       static fromServiceAccount(playApiServiceAccount: any, firebaseApp: app.App): PlayBilling {

   //    Initialize Google Play Developer API client
     const jwtClient = new google.auth.JWT(
     playApiServiceAccount.client_email,   //service account email
     null,
     playApiServiceAccount.private_key,    //service account private key
     ['https://www.googleapis.com/auth/androidpublisher'], // Auth scope for Play Developer API
     null
     );
     const playDeveloperApiClient = google.androidpublisher({
     version: 'v3',
    auth: jwtClient
    });


    return this.fromApiClient(playDeveloperApiClient, firebaseApp);
   }

0 个答案:

没有答案