canonical: https://jentic.com/apis/xero.com/xero-oauth-2-identity-service-api

# Xero OAuth 2 Identity Service API

These endpoints are related to managing authentication tokens and identity for Xero API. The API exposes 2 endpoints secured with basic, oauth2 authentication.

## For AI agents

Programmatically retrieves the connections for this user, deletes a connection for this user (i.e. disconnect a tenant). Covers 2 operations with basic, oauth2 authentication.

## Scope

Does not handle payments, communications, or crm - use for identity and authentication only.

## Capabilities

- Retrieves the connections for this user
- Deletes a connection for this user (i.e. disconnect a tenant)
- Integrate Xero OAuth 2 Identity Service API into automated workflows
- Query and filter Xero OAuth 2 Identity Service API records by parameters
- Monitor Xero OAuth 2 Identity Service API operational status and events

## Use cases

### Identity and Authentication Operations

Use the Xero OAuth 2 Identity Service API to perform identity auth operations programmatically. The API provides 2 endpoints covering core functionality including retrieves the connections for this user, deletes a connection for this user (i.e. disconnect a tenant).

Example prompt: Call GET /Connections to retrieves the connections for this user

### Data Retrieval and Monitoring

Query Xero OAuth 2 Identity Service API resources on a schedule to track changes, generate alerts, or feed downstream dashboards. Agents poll relevant endpoints, compare against previous state, and trigger actions when thresholds are crossed.

Example prompt: Poll the primary Xero OAuth 2 Identity Service API endpoint, compare response to last known state, and alert if changed

### AI Agent Integration via Jentic

AI agents discover and call Xero OAuth 2 Identity Service API endpoints through Jentic without managing credentials directly. An agent searches for the required operation by intent, receives the matching endpoint schema, and executes the call with Jentic-managed authentication. This eliminates the need to read API documentation or handle basic, oauth2 tokens manually.

Example prompt: Search Jentic for 'retrieves the connections for this user', load the operation schema, and execute with Jentic-managed credentials

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | /Connections | Retrieves the connections for this user |
| DELETE | /Connections/{id} | Deletes a connection for this user (i.e. disconnect a tenant) |

## Key resources

- **Connections** — Operations for Connections

## Why Jentic

- **Setup:** Wiring the Xero OAuth 2 Identity Service API by hand means implementing its OAuth2 flow alongside basic auth and managing tenant connections yourself. Through Jentic you install once, import the Xero OAuth 2 Identity Service API from the API Directory, store the OAuth2 credential once, and your agent calls it.
- **Permission scoping:** The Xero OAuth 2 Identity Service API puts the connection id in the URL path (/Connections/{id}), so a rule can pin your agent to one connection. You choose the operations it may call, so deleting a connection is not included unless you add it, and listing connections can stand alone.
- **Credential handling:** Your Xero OAuth2 credential is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'retrieve the connections for this user', and Jentic returns the matching Xero OAuth 2 Identity Service API operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Auth0** — Alternative identity auth API
- **Okta** — Alternative identity auth API

## FAQ

### What authentication does the Xero OAuth 2 Identity Service API use?

The Xero OAuth 2 Identity Service API uses basic, oauth2 authentication. Through Jentic, these credentials are stored encrypted in your Jentic One instance and injected at execution time, so raw secrets never enter the agent context.

### Can I retrieves the connections for this user with the Xero OAuth 2 Identity Service API?

Yes. Use the GET /Connections endpoint. The API returns structured JSON responses that agents can parse and act on directly.

### What are the rate limits for the Xero OAuth 2 Identity Service API?

Rate limits are not specified in the OpenAPI spec. Check the vendor documentation for current limits. Through Jentic, rate limiting is handled automatically with retry logic built into the execution layer.

### How do I retrieves the connections for this user through Jentic?

Install the Jentic SDK with pip install jentic, authenticate through Jentic One, the self-hosted execution layer, then search for 'retrieves the connections for this user'. Jentic returns the matching Xero OAuth 2 Identity Service API operation with its input schema. Load the schema and execute the call - credentials are injected automatically.

### How many endpoints does the Xero OAuth 2 Identity Service API have?

The Xero OAuth 2 Identity Service API exposes 2 endpoints covering connections operations.

### Can I limit what my agent is allowed to do with the Xero OAuth 2 Identity Service API?

Yes. Because you self-host Jentic One, your own rules decide which of this API's two operations the agent may call, so you can allow it to list connections with GET /Connections while withholding the DELETE /Connections/{id} operation that disconnects a tenant. Since the connection id sits in the URL path, a rule can pin the agent to a single connection rather than all of them. Jentic One also injects the stored OAuth2 credential only for the calls you have permitted, so the agent never gains broader access than you grant.
