Use Login with Lockii when you want users to sign in with their Lockii account and let your app call Lockii on their behalf. This works for the REST API and the User MCP.
Configure in the app: Settings → Integrations → API
When to use OAuth vs API keys
| Method | Best for | Access level |
|---|---|---|
| Login with Lockii (OAuth) | Third-party apps, user-delegated integrations, AI clients | Signed-in user's role & permissions |
| API key | Server-to-server automation, Zapier, scripts | Company-level owner permissions |
REST API
Base URL: https://dash.lockii.app/api/v1
OAuth discovery
Start from protected resource metadata — most OAuth clients discover everything automatically from this URL:
https://dash.lockii.app/api/v1/.well-known/oauth-protected-resourceYou can also read authorization server metadata directly:
https://dash.lockii.app/api/v1/.well-known/oauth-authorization-serverOAuth endpoints
| Endpoint | URL |
|---|---|
| Authorization | https://dash.lockii.app/api/auth/oauth2/authorize |
| Token | https://dash.lockii.app/api/auth/oauth2/token |
| Client registration | https://dash.lockii.app/api/auth/oauth2/register |
| Userinfo | https://dash.lockii.app/api/auth/oauth2/userinfo |
| JWKS | https://dash.lockii.app/api/auth/.well-known/jwks.json |
Scopes: openid profile email offline_access
Older /api/auth/oauth/ and /api/auth/mcp/ addresses for authorize, token, register, userinfo, and jwks still reach these paths. Clients that already held an access token need to sign in again. Those tokens were not kept.
Integration flow
Register your client —
POSTto the registration endpoint with yourredirect_uris(dynamic client registration), or use credentials from an existing OAuth app.Authorize — redirect the user to the authorization endpoint using OAuth 2.0 / OIDC with PKCE.
Sign in — the user signs in to Lockii and approves access on the consent screen.
Token exchange — exchange the authorization code at the token endpoint for an access token (and refresh token when
offline_accessis requested).Call the API — send requests with:
Authorization: Bearer <access_token>Example:
curl https://dash.lockii.app/api/v1/booking?status=active&limit=10 \
-H "Authorization: Bearer <access_token>"User MCP (ChatGPT, Claude, Cursor, etc.)
For MCP clients, provide the MCP server URL. OAuth is discovered automatically:
https://dash.lockii.app/api/mcp/userMCP-specific OAuth discovery:
https://dash.lockii.app/api/mcp/user/.well-known/oauth-protected-resourceMCP clients (including ChatGPT and Claude) typically use dynamic client registration — you do not need to pre-share a client ID.
API keys still work as a fallback via x-api-key or ?api_key=....
Permissions & scoping
OAuth requests run as the signed-in Lockii user.
Access is limited to that user's company, role, and location permissions.
Write operations still require the appropriate permissions for that user (e.g. payment refunds require
organization:update).
Related
Lockii REST API — full endpoint reference
User MCP — same capabilities as MCP tools for AI clients
Connecting Zapier — uses API keys, not OAuth
