「Requests to this API firebaseinstallations.googleapis.com method google.firebase.installations.v1.FirebaseInstallationsService.CreateInstallation are blocked.」の解決方法
iOSでFirebaseを利用したアプリを実行した際に以下のエラーが表示された。
Firebase Installation registration failed for app with name: __FIRAPP_DEFAULT, error:
The server responded with an error:
- URL: https://firebaseinstallations.googleapis.com/v1/projects/*****/installations/
- HTTP status code: 403
- Response body: {
"error": {
"code": 403,
"message": "Requests to this API firebaseinstallations.googleapis.com method google.firebase.installations.v1.FirebaseInstallationsService.CreateInstallation are blocked.",
"status": "PERMISSION_DENIED",
"details": [
{
"@type": "type.googleapis.com/google.rpc.ErrorInfo",
"reason": "API_KEY_SERVICE_BLOCKED",
"domain": "googleapis.com",
"metadata": {
"consumer": "projects/******",
"service": "firebaseinstallations.googleapis.com"
}
}
]
}
}
下記の記事を参考にしてGCPのAPI キーの設定画面から「
Firebase Installations API」を有効にするとエラーが解消した。
通常はデフォルトで全てのAPIが有効になっているが「Cloud Vision API」のみを利用するプロジェクトだったので公式ドキュメントに記載されていた指示に沿ってFirebase Installations APIを含む他のAPIは無効化していたのだった。勉強になった。
この記事が気に入ったらサポートをしてみませんか?