google-gemini/generative-ai-android

Get api key

ahmedaa6122 opened this issue · 3 comments

How i can get api key from user account like using auth2 or Google signin library to get api key without get it from website ate there any library for android kotlin?. Thankd

@ahmedaa6122, You can follow feedback Get started with the Gemini API in Android apps (client SDK) tutorial to access the Gemini API directly from your Android app using the Google AI client SDK for Android. Kindly let us know if this answers your query. Thank you!

@singhniraj08
It's not help me for any thing about get api key from thired party library or http request .any help please?

Hi @ahmedaa6122 the API key is tied to a project, and not to a user, so you can't use auth libraries to get the key. As @singhniraj08 commented, the tutorial describes how to get an API key for your app.