From 9bac3fe0458ce5a2d0ef581e27e242074f052219 Mon Sep 17 00:00:00 2001 From: Titus Date: Tue, 1 Dec 2026 04:27:57 +0100 Subject: [PATCH] The account: a new username holds no @; an inactive account's token answers key_revoked Co-Authored-By: Claude Opus 5.5 --- src/content/docs/api/errors/index.mdx | 2 +- src/content/docs/docs/changelog.md | 1 + src/content/docs/docs/development/api/signin.mdx | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/content/docs/api/errors/index.mdx b/src/content/docs/api/errors/index.mdx index 2d20c998..6a0b766c 100644 --- a/src/content/docs/api/errors/index.mdx +++ b/src/content/docs/api/errors/index.mdx @@ -438,7 +438,7 @@ The API key or PIN is missing, unknown or wrong. The API key was recognized but has been revoked. -- **Common cause:** a key that was revoked in the account portal is still used by an old client or script, or an AI seat's old key, after its sponsor or the owner made it a new one. +- **Common cause:** a key that was revoked in the account portal is still used by an old client or script, or an AI seat's old key, after its sponsor or the owner made it a new one. An account token answers it too once it is past its `expires_at`, and while its account is switched off by OnlyWorlds (since 2026-12-01; the token answers again if the account is switched back on). - **How to fix:** mint a new key in the [account portal](https://www.onlyworlds.com/account/) and update the client; an AI seat asks its sponsor or the owner for a new key ([Making a seat](/docs/development/agents#making-a-seat)). Revocation is permanent for that key. ### wrong_audience diff --git a/src/content/docs/docs/changelog.md b/src/content/docs/docs/changelog.md index 32b6e524..88fcde67 100644 --- a/src/content/docs/docs/changelog.md +++ b/src/content/docs/docs/changelog.md @@ -9,6 +9,7 @@ What changed on onlyworlds.com for everyone is on its own [Changelog](https://ww ## 2026-12-01 +- **[The account](/docs/development/api/signin#the-account): a new username holds no `@`.** A name set at sign-up or with `PATCH /api/v2/account` takes the letters a to z, the digits and `. + - _`; one with an `@` is the same `422` with `param` `username`. A name that already holds one is kept and keeps working. An account token of an account OnlyWorlds has switched off now answers `401` [`key_revoked`](/api/errors/#key_revoked), as a revoked one does. - **[Sign in with OnlyWorlds](/docs/development/api/signin#ai-assistants): a client that registered itself reads worlds only.** Its account token, from `POST /api/v2/auth/token`, says `scope: "world:read"` and ends 720 hours after the exchange. `GET /api/v2/account/worlds` lists its worlds with no `keys` on any row. In a world it names, it reads the world, an element type's list, one element, search and metadata, and it may revoke itself; every other route answers `403` `permission_error`. A tool on the list of registered tools signs in as before. - **[Stability and deprecation](/docs/development/api/stability): until OnlyWorlds 1.0, a security fix can ship without the six months' notice.** The API document's policy gained that sentence, and the page quotes it. Such a change is said in the changelog the day it ships. - **[TypeScript](/docs/development/typescript) [4.228.0](https://www.npmjs.com/package/@onlyworlds/sdk): `OwAccountWorld.keys` is optional.** A caller that reads `keys` from a `listAccountWorlds()` row reads it as possibly absent; TypeScript says so at the next build. diff --git a/src/content/docs/docs/development/api/signin.mdx b/src/content/docs/docs/development/api/signin.mdx index f118a9cc..998b3e0c 100644 --- a/src/content/docs/docs/development/api/signin.mdx +++ b/src/content/docs/docs/development/api/signin.mdx @@ -124,7 +124,7 @@ With the token, `GET /api/v2/account` reads the account itself: `id`, `username` `PATCH /api/v2/account` changes `username`, or the OnlyWorld with `only_world`: the id of a world the account owns, or `null` to clear the choice so the oldest world serves again. An id that names no world of the account's is a `404`, and nothing in the body is written. It answers the account as the `GET` does. The person can make the same choice on the site. -A new `username` follows the rule sign-up follows: only the letters a to z (small or capital), the digits 0 to 9 and `@ . + - _`, with at least one letter or digit; at most 30 characters; not another account's name, ignoring case; and never the word `owner`, in any case. A name the rule refuses is a `422` [`invalid_request`](/api/errors/#invalid_request) with `param` `username` and a sentence that says why, and nothing in the body is written. The account's own name sent back unchanged is kept as it is, and changing only the case of one's own name is not refused as taken. Names made before the rule (2026-11-11) stay as they are. +A new `username` follows the rule sign-up follows: only the letters a to z (small or capital), the digits 0 to 9 and `. + - _` (no `@` since 2026-12-01), with at least one letter or digit; at most 30 characters; not another account's name, ignoring case; and never the word `owner`, in any case. A name the rule refuses is a `422` [`invalid_request`](/api/errors/#invalid_request) with `param` `username` and a sentence that says why, and nothing in the body is written. The account's own name sent back unchanged is kept as it is, and changing only the case of one's own name is not refused as taken. Names made before the rule (2026-11-11) stay as they are, and so does a name that already holds an `@`: it keeps working. `GET /api/v2/account/worlds/holding/{element_id}` says which of the account's own worlds holds an element, so a page or a tool that sent elements to be made into a world can ask where they went (since 2026-11-01 for a Narrative's id, since 2026-11-07 for any element's): `200` with `world_id` and `door` (the world's page on onlyworlds.com, a path on this host) when a world the account owns holds that element, and one identical `404` [`not_found`](/api/errors/#not_found) for anything else (a stranger's element, one in a world the account only has a seat in, an unknown or malformed id). A tool that sent its call with an `Idempotency-Key` asks [by the key](/docs/getting-started/keys#a-world-with-its-first-elements) first: a world that holds one of the ids may be an older world of the account's. Any account credential, the site's session included.