POST /api/v2/storefront/agents/{agentId}/accounts/oauth/authorize
Initiates the OAuth flow for per-account agent registration. The resulting tokens are stored against the buyer/operator account the OAuth grant represents — not in the shared agent configuration. The response returns an authorizationUrl to send the operator to. Use this when an OAuth agent needs distinct credentials per buyer account rather than one platform-level token.
Request
curl
Parameters
| Field | Type | Required | Notes |
|---|---|---|---|
agentId | string | Yes | Agent identifier (path parameter) |
accountIdentifier | string | No | Account identifier for the OAuth flow. When omitted, the platform uses a placeholder identifier you can rename later |
Response
authorizationUrl. After consent completes, the platform stores the tokens against the buyer/operator account. Re-fetch the agent with Get agent to confirm hasCustomerAccount: true.
Errors
400 VALIDATION_ERROR— the agent does not use OAuth, orredirectUriis not a valid URI.404 NOT_FOUND— no agent with thatagentIdis visible to the authenticated seller.
Related
Agent tasks
All agent operations
Start agent OAuth
Agent-level token flow instead
Get agent
Confirm the account is registered
Agents overview
OAuth flow concepts