Skip to content

Update and improved instructions to fix API restrictions problem for FIS #1425

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 6, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 12 additions & 11 deletions firebase-installations/API_KEY_RESTRICTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,20 @@ The following SDKs updates introduce a dependency on the [Firebase Installations
- ML Kit
- Instance ID


As a result, API restrictions you may have applied to API keys used by your Firebase applications may have to be updated to allow your apps to call the Firebase Installations API.
As a result, API restrictions you may have applied to API keys used by your Firebase applications may have to be updated to allow your apps to call the [Firebase Installations API](https://console.cloud.google.com/apis/library/firebaseinstallations.googleapis.com).

## What do I need to do?

Before upgrading your application(s) to the latest SDK version, please **make sure that the API key(s) used in your application(s) are whitelisted for the Firebase Installations API:**

- **Open** the [Google Cloud Platform Console](https://console.cloud.google.com/apis/credentials?folder).
- **Choose** the project you use for your application(s).
- **Open** `APIs & Services` and **select** `Credentials`.
- **Click** `Edit API Key` (pencil icon) for the API key in question.
- **Scroll down** to the `API restrictions` section.
- If the radio button shows `Don't restrict key`, the API key is not affected.
Otherwise, from the dropdown menu, **add** the `Firebase Installations API` to the list of permitted APIs, and click `Save`.

**Note:** If you cannot find the [Firebase Installations API](https://console.cloud.google.com/apis/library/firebaseinstallations.googleapis.com) in the list of APIs, you might first have to enable the API for your project (to do so [click here](https://console.cloud.google.com/apis/library/firebaseinstallations.googleapis.com)).
1. **Open** the [Google Cloud Platform Console](https://console.cloud.google.com/apis/credentials?folder).
1. **Choose** the project you use for your application(s).
1. **Open** `APIs & Services` and **select** `Credentials`.
1. **Click** `Edit API Key` (pencil icon) for the API key in question.
1. **Scroll down** to the `API restrictions` section.
1. From the dropdown menu, **add** the `Firebase Installations API` to the list of permitted APIs, and click `Save`.
1. If the radio button shows `Don't restrict key`, you may be looking at the wrong API key. \
You can check which API key is used for the Firebase Installations API by looking at the [service usage page for your project](https://console.cloud.google.com/apis/api/firebaseinstallations.googleapis.com/credentials).

**Note**: **Verify** your fix by checking if you can see successful `200` requests increasing on the [Firebase Installations API request metrics page](https://console.cloud.google.com/apis/api/firebaseinstallations.googleapis.com/metrics). \
**Note**: If you cannot find the Firebase Installations API in the list of APIs, you might first have to enable the API for your project (to do so [click here](https://console.cloud.google.com/apis/library/firebaseinstallations.googleapis.com)).