Mint Token
Changed onMint an ow_a_ account token, with an optional name in the body. Full token shown ONCE. With ai_uses, an AI door token instead: a tool holding an account token trades down to one that opens only the AI uses it names. A token a tool got by signing the person in mints only an AI door token, never an account token (403).
Request
- Base URLhttps://www.onlyworlds.com
- Auth
- HTTP bearer
- or API key in header X-Session-Token
Request body
A label for the token, as the website's tokens list shows it (at most 255 characters, kept as sent). Omitted or empty: no name (an AI door token minted by a token is named after it).
Mint an AI door token (audience ai) for these AI uses (their slugs, as GET /account/ai lists them) instead of an account token: it opens GET /account/ai and POST /account/ai/{use} for these uses only, on this account's rating, and ends at midnight UTC at the latest. Minted with an account token, it is that token's: revoking the token revokes it too (and Disconnect, for a sign-in tool's), while revoking it leaves the token live.
With ai_uses only: the AI door token ends this many minutes after the mint, or at midnight UTC if that comes first. Omitted: at midnight UTC.
Response
Created: the token (shown once).
The label given at mint (a device, a tool).
The token's last four characters, to tell tokens apart.
When the token stops working, for a token a sign-in tool got with a lifetime, and for every token of a client that registered itself or of a game; null never expires. Past it the token is refused as a revoked one (401 key_revoked).
How many live world keys this token minted. Revoking a sign-in tool's token revokes them too, unless the tool holds another live token that is not read-only and whose audience is empty (an mcp or ai token never takes keys), which then takes them. A key minted with keep: true stays through the revoke; a token made by hand, or one of a tool that asks each time, keeps them all. Disconnecting a sign-in tool revokes every key its tokens minted.
Who the token is for: empty for a token made by hand or a sign-in tool's; mcp for a hosted client's grant on the MCP server, which reads only, lives an hour and is renewed by its refresh token. Revoking an mcp token ends the whole grant. ai for an AI door token, which opens only GET /account/ai and the uses in ai_uses, ends at midnight UTC at the latest, and whose revoke touches no other token.
On an ai token only: the AI uses it opens (POST /account/ai/{use}).
On an mcp token only: the client's name, as it registered itself, or the client id when it is no longer registered.
On an mcp token only: the host of the first return address the client registered, of its own choosing, not always where a sign-in sent the person back to.
Only on a token a sign-in minted read-only: one that asked scope=world:read, or any for a client that registered itself, one whose client_id starts worlds-only- (a game's among them) or a listed tool the registry marks read-only. It reads, and every write but its own revoke is 403 permission_error; the token of a client that registered itself or of one whose client_id starts worlds-only- reads worlds only (the sign-in's token, scope). Absent on every other token.
The full ow_a_ token, shown this once; keep it, it is never shown again.
Changes
- info
added the optional property
error/limitto the response with the status - info
added the optional property
error/limitto the response with the status - info
added the optional property
error/limitto the response with the status
2 more changes in this revision
- info