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; otherwise the provider issues an opaque token that the v1 surface will not accept.
Scope
Grants
os.status:read
Read workspace status and storage footprint
os.notes:read
Read notes and folders
os.notes:write
Create and edit notes and folders
os.snapshots:read
Read note version snapshots
os.snapshots:write
Create and restore note snapshots
os.todos:read
Read and search todos
os.todos:write
Create and update todos
os.memory:read
Search agent memory
os.network:read
Read network links, visitors, and contacts
os.share:read
List share links
os.share:write
Create, update, and revoke share links
os.team:read
Read team status and members
os.team:write
Send team invites
os.heartbeat:read
Read autonomy (heartbeat) status and run history
os.heartbeat:run
Trigger heartbeat runs and update autonomy config
agent.message:send
Send agent-to-agent, human inbox, and group messages
# 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".