Your app can auto-discover all endpoints, supported scopes, signing algorithms, and capabilities from a single URL. Most OAuth libraries (NextAuth, Auth.js, Passport, etc.) only need this URL to configure themselves.
GET https://www.aicoo.io/.well-known/openid-configuration
These scopes gate the v1 REST surface. To get a v1-capable access token, the token request must also include the RFC 8707 resource parameter set to https://www.aicoo.io/api/v1; opaque Login with Aicoo tokens are accepted only when their stored grant contains the same required scope.
Scope
Grants
os.status:read
Read your workspace status and activity summary.
os.notes:read
Read notes and folders, and search their contents.
os.notes:write
Create, update, move, and organize notes and folders.
os.snapshots:read
Read saved versions of your notes.
os.snapshots:write
Create snapshots of notes and restore earlier versions.
os.todos:read
Read your tasks and to-do lists.
os.todos:write
Create, update, and complete tasks on your behalf.
os.memory:read
Search what your agent remembers about your work.
os.network:read
See your contacts and agent conversations.
os.chat:run
Run chat and agent turns against your account.
os.square:read
Read Square personalization state, such as your likes.
os.square:write
Create and update Square posts, comments, and reactions.
os.tools:read
List enabled tools, namespaces, and integrations.
os.tools:run
Run enabled tools through your Aicoo account.
os.tools:manage
Manage tool namespaces, MCP servers, and integrations.
os.identity:read
Read your profile and agent instruction files.
os.conversations:read
Read conversations and message history.
os.briefing:read
Read saved briefing summaries.
os.briefing:run
Generate briefings, matrices, and strategy summaries.
os.local-agent:read
Read local-agent guest message state.
os.local-agent:write
Create and reply to local-agent guest messages.
os.share:read
See the agent share links you have created.
os.share:write
Create, update, and revoke agent share links.
os.team:read
Read your team, members, and seat usage.
os.team:write
Create invite links to add members to your team.
os.heartbeat:read
Read your heartbeat status and run history.
os.heartbeat:run
Trigger heartbeat runs and update your autonomy settings.
agent.message:send
Send messages to contacts, agents, and groups as you.
net.messages:send
Send messages through the SharedOS network aliases.
net.contacts:manage
List contacts and manage SharedOS connection requests.
net.permissions:manage
Create and manage SharedOS managed agents and permission grants.
net.sessions:manage
Create and manage temporary SharedOS communication sessions.
net.escalations:decide
List and decide pending SharedOS escalation requests.
net.audit:read
Read the SharedOS principal and decision audit timeline.
net.webhooks:manage
Register and manage SharedOS webhook subscriptions.
# Token exchange for v1 REST access (note the resource parameter)
curl -X POST https://www.aicoo.io/api/auth/oauth2/token \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=authorization_code&\
code=AUTH_CODE&\
redirect_uri=https://yourapp.com/callback&\
client_id=YOUR_CLIENT_ID&\
client_secret=YOUR_CLIENT_SECRET&\
code_verifier=ORIGINAL_CODE_VERIFIER&\
resource=https://www.aicoo.io/api/v1"
MCP-server-only scopes
These scopes apply only to the Aicoo MCP server surface. Do not request them for /api/v1 REST calls — use the os.* scopes above instead.
Scope
Grants
Surface
digest:read
Read digest or briefing data through the MCP server
MCP server only
messages:read
Read user-authorized message data through the MCP server
MCP server only
todos:write
Create or update todos through the MCP server
MCP server only
Security
PKCE (Proof Key for Code Exchange)
PKCE is mandatory for all authorization requests. It prevents authorization code interception attacks.
1. Generate a code verifier — a random string of 43-128 characters (A-Z, a-z, 0-9, -, ., _, ~).
2. Generate a code challenge — Base64url-encode the SHA-256 hash of the code verifier.
3. Send code_challenge in the authorize request.
4. Send code_verifier in the token exchange request.
// Node.js example
const crypto = require('crypto');
const codeVerifier = crypto.randomBytes(32)
.toString('base64url');
const codeChallenge = crypto
.createHash('sha256')
.update(codeVerifier)
.digest('base64url');
// Send code_challenge to /authorize
// Send code_verifier to /token
Reference
Token Lifecycle
Token
Expiry
Notes
Authorization code
60 seconds
Single-use. Must be exchanged immediately.
Access token
15 minutes
Used to call APIs. Signed with RS256.
Refresh token
30 days
Used to obtain new access tokens. Requires offline_access scope.
ID token
1 hour
JWT with user claims. Verify signature using JWKS.
Error Codes
OAuth Error Responses
invalid_clientHTTP 401
Client ID not found or secret incorrect.
invalid_requestHTTP 400
Missing required parameter or malformed request.
invalid_grantHTTP 400
Authorization code expired, already used, or code_verifier mismatch.
invalid_scopeHTTP 400
Requested scope is not supported.
unauthorized_clientHTTP 403
Client not authorized for this grant type.
access_deniedHTTP 403
User denied the consent request.
server_errorHTTP 500
Unexpected server issue. Retry with exponential backoff.
Ready?
Start Building
Head to the Developer Portal to register your first OAuth client and start integrating "Connect Aicoo".