Authentication
Your code uses an API token. An MCP client such as Claude Code can use a token too, or sign in with OAuth and never hold one.
API tokens
Create a token in the console under API & MCP, or with the API from a token you already have. Send it on every request:
Authorization: Bearer <token>- A token belongs to one team. It sees that team's logins, runs and records and nothing else.
- Rover shows a token once, when it is created, and keeps only its sha256. A lost token cannot be recovered. Create a new one.
- Every token expires. The default is 90 days and the limit is a year. A token created by another token never outlives it.
- Anyone on the team except a viewer can create and revoke tokens.
curl -X POST https://rover.waste.dev/v1/tenants/mine/tokens \
-H "Authorization: Bearer $ROVER_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "billing-sync", "expiresAt": "2027-03-01T00:00:00Z"}'The answer carries token, tokenSha256 and expiresAt. List your team's tokens with GET /v1/tenants/mine/tokens, which returns hashes and names only. Revoke one with DELETE /v1/tenants/mine/tokens/{tokenSha256}. It stops working at once.
A request with no token, or with one that is unknown, expired or revoked, gets 401 and a WWW-Authenticate: Bearer header.
Accounts
A token files each login under an account, a label you choose. If your product serves many customers through one Rover team, use your own customer id. If not, use one label, such as main. A token must name the account whenever it stores, changes or reads one login, and Rover never answers a call for one account with another account's data. Lists without account cover the whole team. A person signed in to the console does not need an account.
OAuth for MCP clients
The MCP endpoint, https://rover.waste.dev/v1/mcp, also accepts OAuth. A client that supports MCP authorization finds everything it needs on its own:
- Discovery:
/.well-known/oauth-protected-resourceand/.well-known/oauth-authorization-server. - Clients register themselves (
POST /v1/oauth/register) and hold no client secret. - Authorization code with PKCE (S256). The person approves the app for their team in the Rover console.
- An access token lasts one hour. A refresh token lasts 30 days.
An OAuth token works only on /v1/mcp. Anywhere else it gets 401. An app connected this way can do what the person's role allows, except create tokens, invite people or change roles, which answer 403. Destructive tools also ask for "confirm": true.
To disconnect an app, remove it under API & MCP in the console, or call DELETE /v1/oauth/grants/{id}. Its tokens stop working at once.
MCP with a token
A client that cannot sign in can send a token as a header instead:
claude mcp add --transport http rover https://rover.waste.dev/v1/mcp \
--header "Authorization: Bearer $ROVER_TOKEN"Roles
People on a team are admins or viewers. A viewer can read everything the team can see and change nothing. An admin can also connect logins, start runs, manage tokens and invite people. Each operation in the API reference says who may call it.