Google Maps SDK API

Hi,
I am trying to get Google map in to the web viewer to get coordinates. i have my API key and used the code from the below link.

https://community.appinventor.mit.edu/uploads/default/original/2X/e/e78592ae570ac3857f827bdd10b79cf55eaf72a0.jpeg

but the a app when opened giving error " this API key is not authorised to use in this app package.

Question:
Please guide me how to use the API Key with my app. where to enter the app package and how to get the package name of my app in mit app inventor.

Regards

The api key goes at the green arrow

apiKey

Did you copy the key exactly, without any additional spaces? To understand why you got an error, it is necessary to review how you used the code snippet. :cry: Do not reveal your api code (strike it out).

When you registered for your api, I believe they ask for a Project name (sorry don't remember); if your new Project has a different identification, that might be the issue. Unfortunately I don't know.

Review

Usa chiavi API  |  Maps Embed API  |  Google for Developers

I am worried about the "SHA-1 certificate fingerprint " how to generate this for the MIT app.

i think this is what is missing for my API KEY to be usable. if i am wrong Please correct me.

The original advice was provided in 2020 (two years ago). Google may have changed their terms of service. I expect you need to provide separate 'billing' instructions for each Project. I do not think your issue involves SHA-1 at all, merely that the project is not properly set up for billing. The map api is 'free' only for a certain amount of usage (all your projects). Users get a 12-month or $300 credit free trial. When this free trial ends, I think you presently will get up to 28 000 map requests per month and 40 000 direction calls per month, free of charge. You will only be billed when your usage exceeds your monthly $200 credit limit. Google needs a way to provide accounting and uses a Billing Account. Is yours set up?

Actually, i have the credits, but the API Ley is shown with the Orange Warning Symbol but not the green tick mark, that is why i am doubting.

untill i provide the SHA1 it is not going to remove that.

Can you guide me to get the SHA1 for the apk made in MIT app inventor.

Under "Application restrictions", try selecting "None".

Try Tims' advice or use the advice at Usar chaves de API  |  SDK do Maps para Android  |  Google Developers . and use the Maps Console to associate the key with your Project (e.g.

Enter your package name and SHA-1 certificate fingerprint. For example:

com.example.android.mapexample substituting you current Project package name. Did that work?

It's important to note here that the companion package is different than your compiled app. If you're restricting based on package you will need to allow for both if possible. Otherwise, you'll always need to compile to test your app since naturally all app package names need to be unique.