Authentication
Every request carries a bearer token. Generate one in Studio, or sign in with your browser.
All OCPPLab APIs, SDKs, CLIs and MCP servers accept the same credential:
SDK tokens
Use an SDK token for code, scripts, CI and headless agents.
A token acts as the member who generated it and does not expire. To revoke it, delete it in SDK tokens: anything using it stops working at once.
Never commit a token. Read it from OCPPLAB_TOKEN or your secret manager.
Browser sign-in (OAuth)
The CLI and MCP clients can sign you in with your OCPPLab account instead of a token. You sign in, choose the organization the app may use, and select Allow. The app stores and refreshes its own access.
- CLI:
ocpplab-cli auth login. See ocpplab-cli. - MCP: add
https://api.ocpplab.io/mcpto Claude Code, Cursor, VS Code, claude.ai or ChatGPT with no credentials. See Connect a client.
Disconnect an app in Studio under Settings → Connected apps.
What a token can see
- Organization: every result is scoped to the token’s organization. An id from another organization returns
404. - Role: admin-only operations, such as removing an OCPI partner, return
403unless the token belongs to an organization admin.