How does Google Cloud Platform API key restriction for iOS apps work?
google-cloud-platform, google-maps-api-3, google-speech-api, google-translate, ios
Solution
I think Google Translation API just identifies your app by value in request header key `x-ios-bundle-identifier`.
I tried using Postman to send a successful request with following parameters.
- GCP API Key config
- Postman request
Problem
According to: https://cloud.google.com/speech/docs/common/auth We can create an API key to a GCP resource (e.g. Google Maps, Speech, Translate) restricted by "iOS apps" to a particular bundle ID. In principle this is great, but how does GCP actually implement this? How does GCP determine the client's bundle ID since only the client is only making standard HTTP requests to GCP -- presumably it's not reporting its bundle ID in the header? I'd like to enable this for an API key but don't want to suddenly shut down my iOS client because somehow it's not reporting its bundle ID.