Skip to main content
A first-party API in Auth0 is owned and operated by your organization and registered in the Auth0 Dashboard. The user can grant your AI agent permission to access a first-party API on their behalf. After a user authenticates, Auth0 issues an access token scoped to the first-party API that contains the permissions granted by the user.

How it works

The following diagram shows the delegated authorization flow for calling a first-party API:
Authorization Flow

Authorization Flow

1

User authentication

A user logs into your AI application or agent interface (e.g., via Universal Login).
2

Access token issuance

After the user authenticates, Auth0 issues an access token to your application.
3

AI agent makes a tool call

When the AI agent needs to access user-specific data or perform an action, it makes a tool call to an API endpoint.
4

Token forwarding

The access token obtained in step 2 is included in the API request (typically in the Authorization header).
5

API validation & response

The API validates the access token. If valid, it processes the request on the user’s behalf and returns the response to the AI agent.
6

AI agent receives and processes the information

The AI agent uses this response to fulfill the user’s request.

Get started

To enable your AI agents to call your own APIs, refer to the following resources:

Quickstarts

Call Your APIs On User's Behalf

Sample Apps

Fullstack (Next.js, FastAPI)

Agent0 (React + Fastify + Vercel AI SDK)

Assistant0 (Next.js, FastAPI)

Learn more

Auth0 Docs for APIs