matanshukry / flutter_google_places_sdk

Flutter plugin for google places native sdk
32 stars 68 forks source link

Google Place API KEY Android package and SHA1 restriction doesn't work #89

Closed imele closed 3 weeks ago

imele commented 3 weeks ago

Hi! I can't restrict my API KEY for a package name and SHA1 in google cloud. If i restricted with IP is working but not with the android SDK _FlutterGooglePlacesSdk::call error: PlatformException(API_ERRORPLACE, 9011: This IP, site or mobile application is not authorized to use this API key. Request received from IP address XXXXXXXX, with empty referer, {type: class com.google.android.gms.common.api.b}, null)

Anyone with the same problem?

flutter_google_places_sdk: ^0.3.9

Flutter (Channel stable, 3.22.0, on Microsoft Windows [Versi¢n 10.0.22000.2538], locale es-ES) [√] Windows Version (Installed version of Windows is version 10 or higher) [√] Android toolchain - develop for Android devices (Android SDK version 34.0.0) [√] Chrome - develop for the web [√] Visual Studio - develop Windows apps (Visual Studio Professional 2022 17.9.5) [√] Android Studio (version 2022.3) [√] VS Code (version 1.90.1) [√] Connected device (4 available) [√] Network resources

imele commented 3 weeks ago

Apparently, even if you run the application in release mode in VSCode, you must use the DEBUG SHA1 fingerprint in google cloud console restrictions.