0
I have 2 key api, one with restriction for android apps and the other without, when I put the app to use the restricted api it can not access the api returning Error "403 Forbidden", in the unrestricted api everything works normally.
Already check the SHA-1 and the package and everything seems correct.
You generated sha-1 as a release?
– viana
i did it using this tutorial: https://stackoverflow.com/questions/27609442/how-to-get-the-sha-1-fingerprint-certificate-in-android-studio-debug-mode
– Igor Oliveira
If you generated sha-1 debug, then it should work, just put the generated key in your project.
– viana
No projeto que você diz, no android studio ou na restrição da api no console do google? se for android onde eu coloco ?
– Igor Oliveira
See this image: https://i.stack.Imgur.com/u4Ppn.png On the third screen is google_maps_api.xml. Instead of YOUR_KEY_HERE. you must put the key that generated on the google console.
– viana
I have already done this, however from the error when I access using the key q has restriction, this is the problem =/
– Igor Oliveira
I don’t understand. What is this restriction?! Where?! In the app?! You have already given access to internet in Manifest?!
– viana
Look at the image you have in the post, I have a key with the option "none" and this with the key restriction for "android apps", the key with restriction does not work, and the unrestricted works
– Igor Oliveira
Here’s the thing, you can restrict this key only to Android to work only in your app. If released, it will work on both the web and android, or Ios etc, but you run the risk of someone trying to use your key on another website if you manage to steal this key. This causes, if you theme too much access, exceed your free quota of access to the google maps api. = D
– viana
It’s probably not working in your app because you got some of your tutorial procedures wrong, or it might not be quite right because there’s some update. Because also that answer ai is 2015.
– viana
I have the same problem: When registering the key restriction for apps for android, my app can no longer access. I am sure about the package name and also SHA1, because I use firebase.
– Itapox