AI Agent Authentication: How to Let Your Agent Act in Your Users' Apps
AI agent authentication lets your agent act in each user's Shopify, Gmail or GitHub account. See the OAuth, token and isolation work involved, and how AIsa Connect does it.

Questo articolo è disponibile solo in inglese.
Short answer: AI agent authentication is how an agent gets permission to act in an app for one specific person, such as reading a merchant's Shopify orders or searching their Gmail. When the agent lives in your product and works for your users, you need three things: a way for each user to connect their app, a safe place to keep that connection, and a guarantee that a run for one user only ever uses that user's connection. AIsa Connect gives you all three through one API, on the AIsa key you already have, at $0.0003 per successful run.
Key takeaways
- Two problems share one name. Authenticating your agent to an API is solved with a key. Letting your agent act in your users' accounts is delegated access, and it is where the work is.
- Each app connects differently. Gmail, GitHub and Notion use OAuth; Shopify takes an Admin API token; WooCommerce takes a consumer key and secret. Your product has to handle all of them.
- AIsa Connect handles the plumbing. It hosts the OAuth page, keeps each connection tied to your user's ID, checks every input against the action's schema and runs the action in the app.
What is AI agent authentication?
AI agent authentication covers two different questions:
- Who is the agent? When your agent calls an API you own or pay for, it proves its identity with an API key or a service token. This part is familiar: one key, kept on your server.
- Who is the agent acting for? When your agent reads a merchant's orders or a customer's inbox, it needs that person's permission in that app. This is delegated access: the user grants it once, and the agent uses it until the user revokes it.
The second question is the hard one, and it is what this article is about. A support agent, a store assistant or a reporting tool built into your product needs delegated access for every one of your users, in every app they use.
Why delegated access is harder than a login button
Adding "Connect your Shopify store" to a settings page looks small. Doing it well for hundreds of users and several apps means:
- Registering an OAuth app per platform, with redirect URLs, scopes and, for some platforms, a review before you can go live.
- Storing and refreshing tokens for every user, encrypted, and noticing when a user revokes access.
- Keeping users apart. A run for merchant A must never pick up merchant B's token, even when both connected the same app.
- Separating reads from writes, so the agent can look freely but asks a person before it changes data.
- Avoiding duplicate writes. A retry after a timeout can tag an order twice or send two notes.
- Writing a client for each API, each with its own errors, pagination and rate limits.
None of this is the product you set out to build. It is the work that stands between your agent and your users' data.
The three ways an agent gets access to a user's app
Most apps your users rely on fall into one of three sign-in types:
| Sign-in type | Examples | What the user provides | How AIsa Connect connects it |
|---|---|---|---|
| OAuth 2.0 | Gmail, GitHub, Notion, Linear | Approval on the app's consent screen | A page AIsa hosts, which you poll until done |
| API key or token | Shopify, Klaviyo, Stripe | A key or Admin API token created in the app | Your form forwards it once |
| Store credentials | WooCommerce | Store URL, consumer key and consumer secret | Your form forwards them once |
Whichever type an app uses, the result in AIsa Connect is the same: one connection, owned by your AIsa account and one end user, the user's ID in your system (externalUserId).
How AIsa Connect handles agent authentication
AIsa Connect is an API for actions in apps your users connect. A developer integrates it in three requests, all from the server, all with one AIsa API key.
1. Find the action
Every app in the catalog lists its actions. Each action has a key such as shopify.list_orders, a JSON Schema for its input, and a label that says whether it reads, writes or deletes.
curl -s "https://api.aisa.one/apis/v1/connector/apps/shopify/actions?q=order" \
-H "Authorization: Bearer $AISA_API_KEY"
2. Let the user connect the app
For an app that takes credentials, such as Shopify, your product collects the fields and forwards them once:
curl -s -X POST "https://api.aisa.one/apis/v1/connector/connect/shopify/credentials" \
-H "Authorization: Bearer $AISA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"externalUserId": "store_8812",
"apiKey": "<ADMIN_API_ACCESS_TOKEN>",
"credentials": { "shopDomain": "acme.myshopify.com" }
}'
AIsa checks the fields against the app's list first, so a missing shopDomain returns 400 invalid_request before anything reaches Shopify. Shopify then checks the token; a rejected one returns 400 connect_failed. AIsa does not log or return the credentials you send.
For an OAuth app, such as Gmail or GitHub, start a connect session and open its connectUrl in the user's browser:
curl -s -G "https://api.aisa.one/apis/v1/connector/connect/gmail" \
-H "Authorization: Bearer $AISA_API_KEY" \
--data-urlencode "externalUserId=store_8812"
The user approves access on the app's own consent screen, and your server polls the session until its state is completed, failed or expired. The link expires after 30 minutes, and your server never handles an OAuth token.
3. Run the action for that user
curl -s -X POST "https://api.aisa.one/apis/v1/connector/actions/run" \
-H "Authorization: Bearer $AISA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"actionKey": "shopify.list_orders",
"externalUserId": "store_8812",
"input": { "first": 50, "query": "fulfillment_status:unfulfilled" }
}'
AIsa finds the connection that belongs to store_8812, validates input against the action's schema and returns the app's result with a run id. The X-AISA-Customer-Cost-Micros-USD header says what the run cost: 300 micro-USD, or $0.0003.
Example: a morning brief agent for Shopify merchants
Say your product is an operations assistant for small Shopify stores. Each morning it should tell the merchant which orders are stuck, which items are running low and which customers already wrote in. The merchant connects Shopify and Gmail once in your product; after that, the agent's run looks like this:
| Step | Action | Type |
|---|---|---|
| Find orders that are not fulfilled yet | shopify.list_orders | read |
| Check stock for the items in those orders | shopify.get_inventory_quantities | read |
| Find customer emails about those orders | gmail.search_threads | read |
| Tag the orders the merchant approved for a reply | shopify.add_tags | write |
The agent reads freely and writes only after the merchant approves the list. Four runs cost $0.0012. The same pattern powers the step-by-step builds on our solution pages for a Shopify AI agent, an AI customer support agent and automated ecommerce reporting.
Safeguards for agents that act for other people
Delegated access only works if users can trust what the agent does with it. AIsa Connect builds these rules into every run:
- Isolation by end user. A connection belongs to your AIsa account and one
externalUserId. A run for one user cannot use another user's connection. - Read, write and destructive labels. Every action declares what it does, so your agent can ask a person before anything changes.
- Schema validation first. Input that does not match the action's schema returns
422 validation_failed, and nothing reaches the app. - No automatic retries. AIsa sends each run once. If a write ends in
outcome_unknown, check the app before running it again, so nothing happens twice. - Errors that name who fixes them. Each error says whether the user, the app or AIsa caused it, so your product knows when to ask the user to reconnect.
- Clear limits. 300 reads and 60 writes per minute per API key, and 100 active connections per account by default.
What AIsa Connect costs
Each successful run costs $0.0003, the same on every plan, from the same AIsa balance as your models and data APIs. Failed runs are not charged. Browsing the catalog, connecting accounts and managing connections are free.
| Build it yourself | AIsa Connect | |
|---|---|---|
| OAuth apps | One registration per platform | Hosted page, nothing to register for listed apps |
| User credentials and tokens | Your vault, your refresh logic | Kept with the connection; you keep a user ID |
| Isolation between users | Your code | Built into every connection |
| Calling the app | A client per API | One request shape and a schema per action |
| Price | Engineering time and hosting | $0.0003 per successful run |
Get started
AIsa Connect is available to every AIsa account today, with your existing key and balance.
- Read the AIsa Connect guide.
- Connect a test account in the AIsa console.
- Browse every app and its actions on the Connectors tab, or see the AIsa Connect product page.
Questions or a higher connection limit: developer@aisa.one.
FAQ
What is AI agent authentication?
AI agent authentication is how an AI agent proves who it is and gets permission to act in an app. For agents inside your product, the important part is delegated access: each of your users grants the agent access to their own account, and the agent acts in that account only for that user.
How do AI agents use OAuth?
The user approves access on the app's consent screen, and the app issues a token for that user. With AIsa Connect, the consent flow runs from a page AIsa hosts, AIsa keeps the resulting connection, and your agent refers to it through the user's externalUserId instead of handling the token.
Do I need to store my users' OAuth tokens?
No. Your server keeps only the user's ID in your system. For apps that take a key or store credentials, you forward the fields once and do not need to keep them.
Can one user's agent reach another user's accounts?
No. Every connection belongs to your AIsa account and one externalUserId, and a run for one user can only use that user's connections.
Which apps can my users connect?
The catalog lists close to 1,700 apps with a sign-in method. Shopify, WooCommerce, Square, Gmail, Google Sheets, Google Calendar, Google Drive, Notion, Airtable, Klaviyo, Mailchimp, Stripe, GitHub, Linear and Jira are verified in production. Google apps connect with read access today.
Is AIsa Connect an alternative to Composio or Pipedream Connect?
It covers the same job: hosted OAuth, one stored connection per user and actions across many apps. What sets it apart is that it runs on the AIsa key and balance you already use for models and data APIs, and each successful run costs $0.0003, with failed runs free.
Can I call AIsa Connect from the browser?
No. Call it from your server with your AIsa API key. Only the hosted connect link opens in the user's browser.
Sources and further reading
- AIsa Connect guide: requests, error codes, limits and pricing.
- RFC 6749: The OAuth 2.0 Authorization Framework
- Shopify API search syntax, used by
shopify.list_ordersqueries. - Gmail search operators, used by
gmail.search_threadsqueries.
Drafted with AI help and checked by the AIsa team against the AIsa Connect guide and the live connector catalog.