Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue setting up Android gemini API key restriction #170

Open
AndreSand opened this issue Jun 3, 2024 · 2 comments
Open

Issue setting up Android gemini API key restriction #170

AndreSand opened this issue Jun 3, 2024 · 2 comments
Assignees
Labels
component:android app Issue/PR related to Android App status:triaged Issue/PR triaged to the corresponding sub-team type:bug Something isn't working

Comments

@AndreSand
Copy link

Description of the bug:

Hi, I followed the tutorial for Android to set Android application key restriction from the cloud console , but I’m not able to get it to work. I get the error “Requests from this Android client application are blocked.

Is this a known issue? Or maybe I’m doing something wrong?

Thanks,
Andres

Actual vs expected behavior:

Accept requests from my Android app after setting up the cloud console restriction

Any other information you'd like to share?

My cloud console configuration. I'm testing different variations to see if it works. I'm using an App bundle with Google app signing
Screenshot 2024-06-03 at 10 29 24 AM

@singhniraj08 singhniraj08 added type:bug Something isn't working status:triaged Issue/PR triaged to the corresponding sub-team component:android app Issue/PR related to Android App labels Jun 4, 2024
@RobinKumar5986
Copy link

Hi I have created an AI based chat application using the gemini API.

Use this link for getting the API keys for Android.
https://aistudio.google.com/app/apikey

and for others view this docs :
https://ai.google.dev/gemini-api/docs/get-started

and for the integration of gemini API in the project you can refer to these docs :

https://ai.google.dev/gemini-api/docs/get-started/tutorial?lang=android

@mariolourobert
Copy link

Hi,
I think I face the same issue. I'm not able to use the API key restriction feature with the Gemini Android SDK.
I tried to use it with a debug application, following this command that is written in the API restriction console page:

keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:android app Issue/PR related to Android App status:triaged Issue/PR triaged to the corresponding sub-team type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants