[英]Firebase In App Messaging PERMISSION_DENIED
I did setup for firebase in App messaging.我在 App 消息传递中设置了 firebase。 Created campaign and my app can't deliver it.已创建广告系列,但我的应用无法投放。 In logcat I got following logs在 logcat 我得到了以下日志
2019-02-26 11:22:40.616 16131-16131/app.package.name I/FIAM.Headless: Starting InAppMessaging runtime with Instance ID ciy4xtnJqBQ
2019-02-26 11:22:42.153 16131-16131/app.package.name I/FIAM.Headless: Setting display event listener
2019-02-26 11:22:42.457 16131-16131/app.package.name I/FIAM.Headless: went foreground
2019-02-26 11:22:42.464 16131-16157/app.package.name I/FIAM.Headless: Forcing fetch from service rather than cache. Test Device: false | App Fresh Install: true
2019-02-26 11:22:42.472 16131-16157/app.package.name W/FIAM.Headless: Recoverable exception while reading cache: /data/user/0/app.package.name/files/fiam_impressions_store_file: open failed: ENOENT (No such file or directory)
2019-02-26 11:22:42.483 16131-16157/app.package.name I/FIAM.Headless: Fetching campaigns from service.
2019-02-26 11:22:42.999 16131-16157/app.package.name W/FIAM.Headless: Service fetch error: PERMISSION_DENIED: Requests to this API firebaseinappmessaging.googleapis.com method google.internal.firebase.inappmessaging.v1.sdkserving.InAppMessagingSdkServing.FetchEligibleCampaigns are blocked.
Setup设置
Android studio 3.3.1安卓工作室 3.3.1
com.google.firebase:firebase-inappmessaging-display:17.0.5 com.google.firebase:firebase-inappmessaging-display:17.0.5
com.google.firebase:firebase-core:16.0.7 com.google.firebase:firebase-core:16.0.7
Firebase in app messaging API enabled in Google Cloud Console在 Google Cloud Console 中启用 Firebase 应用消息传递 API
What could be reason of?可能是什么原因?
2019-02-26 11:22:42.999 16131-16157/app.package.name W/FIAM.Headless: Service fetch error: PERMISSION_DENIED: Requests to this API firebaseinappmessaging.googleapis.com method google.internal.firebase.inappmessaging.v1.sdkserving.InAppMessagingSdkServing.FetchEligibleCampaigns are blocked.
The reason of the issue was restriction on API key for Android app.问题的原因是对 Android 应用程序的 API 密钥的限制。 So InAppMessaging API was enabled for the whole project but it also require add InAppMessaging API to the specific platform API key restriction.因此为整个项目启用了 InAppMessaging API,但它也需要将 InAppMessaging API 添加到特定平台 API 密钥限制。
您必须将 firebase InApp Messaging 权限添加到您的 Google Cloud API,可以从 Google Cloud Console 完成
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.