我正在我的 android 项目中使用 google Play Billing Library,但仍然收到 Permission denied 错误我联系了 google play 团队,他们说 api 访问没有问题,可能是错误来自 GCP .. 所以我有添加了许多其他权限来检查 api 是否正常工作,但仍然获得权限拒绝.. Kotlin Android 代码
FirebaseFunctionsException.Code.PERMISSION_DENIED
这是Gcp的权限
并且这个操作触发了权限错误 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);
}