Prompt Buddy logoPrompt Buddy

google · Google AI Docs

Gemini API Authentication with OAuth quickstart

A guide for setting up and implementing OAuth authentication to access the Gemini API.

Import to Prompt Buddy

Derived skill

Files assembled from official documentation

Viewing SKILL.md

Gemini API Authentication with OAuth quickstart

A guide for setting up and implementing OAuth authentication to access the Gemini API.

When To Use

Use when you need to implement secure, user-delegated access to the Gemini API using OAuth credentials instead of simple API keys.

Reference Files

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/gemini-api-authentication-with-oauth-quickstart-workflow-guide.mdA guide detailing the steps to set up and enable OAuth authentication for the Gemini API via a Google Cloud project.Questions about a guide detailing the steps to set up and enable OAuth authentication for the Gemini API via a Google Cloud project.
examples/gemini-api-authentication-with-oauth-quickstart-gemini-api-oauth-gcloud-.textA shell command for authenticating with the Gemini API using gcloud application default credentials and specific OAuth scopes.Exact payloads, commands, or snippets shown in A shell command for authenticating with the Gemini API using gcloud application default credentials and specific OAut...
examples/gemini-api-authentication-with-oauth-quickstart-gemini-api-oauth-curl-au.textA shell command sequence using curl and gcloud to authenticate with the Gemini API using an OAuth access token.Exact payloads, commands, or snippets shown in A shell command sequence using curl and gcloud to authenticate with the Gemini API using an OAuth access token.
examples/gemini-api-authentication-with-oauth-quickstart-gemini-api-oauth-python-.textThe pip install command required to install the google-genai library for Gemini API authentication.Exact payloads, commands, or snippets shown in The pip install command required to install the google-genai library for Gemini API authentication.
examples/gemini-api-authentication-with-oauth-quickstart-gemini-api-oauth-python--2.textA Python code example demonstrating how to initialize the Gemini API client using OAuth credentials.Exact payloads, commands, or snippets shown in A Python code example demonstrating how to initialize the Gemini API client using OAuth credentials.
examples/gemini-api-authentication-with-oauth-quickstart-gemini-api-oauth-python--3.textShell commands to install the required Google API client and authentication libraries for Python.Exact payloads, commands, or snippets shown in Shell commands to install the required Google API client and authentication libraries for Python.
examples/gemini-api-authentication-with-oauth-quickstart-gemini-api-oauth-python--4.textA Python script demonstrating how to load credentials and manage OAuth tokens for authenticating with the Gemini API.Exact payloads, commands, or snippets shown in A Python script demonstrating how to load credentials and manage OAuth tokens for authenticating with the Gemini API.
examples/gemini-api-authentication-with-oauth-quickstart-gemini-api-oauth-python--5.textA Python code example demonstrating how to initialize a Gemini API client using OAuth credentials.Exact payloads, commands, or snippets shown in A Python code example demonstrating how to initialize a Gemini API client using OAuth credentials.
examples/gemini-api-authentication-with-oauth-quickstart-gemini-api-oauth-python--6.textA Python script demonstrating how to authenticate with the Gemini API using OAuth credentials.Exact payloads, commands, or snippets shown in A Python script demonstrating how to authenticate with the Gemini API using OAuth credentials.

What This Skill Covers

  • The easiest way to authenticate to the Gemini API is to configure an API key, as described in the Gemini API quickstart. If you need stricter access controls...
  • Main sections: Objectives, Prerequisites, Set up your cloud project, 1. Enable the API, 2. Configure the OAuth consent screen.

Workflow

  1. Open the most relevant file under docs/ for the exact documented workflow and wording.
  2. Open schemas/ files for exact structured contracts.
  3. Open examples/ files for concrete requests, commands, snippets, and manifests.
  4. Do not add behavior or configuration that is not present in the attached source files.

Canonical source: https://ai.google.dev/gemini-api/docs/oauth