React Native Google Places API restriction issue

879 views Asked by At

I get the following error while using React Native Google Places autocomplete.

This IP, site or mobile application is not authorized to use this API key...

I'm using a Google Places API Web Service key, which restrictions on Android-App. This one is restricted with the package name com.xxx.xxx.debug and com.xxx.xxx.test. Another API key is restricted to com.xxx.xxx. I've added the proper SHA-1 key.

Anyone has a clue what I'am doing wrong or why it doesn't work? I've checked the docs of Google and tried out many different things, still I cannot get it to work with a restriction.

1

There are 1 answers

5
Jeffrey Rajan On

Add your React-Native android package id to the key you are using for Google Places API. You can find it in Project(Root Folder) => android => app => build.gradle => application id