Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions contract/shapes.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
"GET /api/v2/character/{id}/files": {"props":{"data":{"items":{"props":{"id":{},"name":{},"kind":{},"size":{},"label":{},"added_by":{"props":{"name":{},"membership":{},"agent":{},"owner":{}},"required":["name","membership","agent","owner"]},"added_at":{}},"required":["id","name","kind","size","label","added_by","added_at"]}}},"required":["data"]},
"GET /api/v2/collective query": {"props":{"limit":{},"cursor":{},"expand":{},"fields":{},"name":{},"name__icontains":{},"supertype":{},"subtype":{},"characters":{},"operator":{},"ids":{},"created_by":{},"as":{},"world":{}},"required":[]},
"GET /api/v2/marker/{id} 410": {"props":{"error":{"props":{"type":{},"code":{},"message":{},"param":{},"doc_url":{},"refusals":{"items":{"props":{"word":{},"stop_reason":{},"output_tokens":{}},"required":["word","stop_reason","output_tokens"]}},"unknown_fields":{"items":{}},"types_with_field":{"props":{},"required":[],"open":true},"allowed_fields":{"items":{}},"limit":{},"reason":{}},"required":["type","code","message","param","doc_url"]},"change_seq":{},"deleted_at":{}},"required":["error","change_seq","deleted_at"]},
"GET /api/v2/me": {"props":{"world":{"props":{"id":{},"name":{}},"required":["id","name"]},"scope":{},"kind":{},"role":{},"membership":{},"character":{},"lenses":{"items":{}},"lenses_from":{},"x_served_trimmed":{"items":{"const":"lenses"}},"name":{},"front_door":{"props":{"sponsor":{"props":{"id":{},"kind":{},"name":{}},"required":["id","kind","name"]},"sponsor_character":{},"my_character":{},"my_seats":{"items":{"props":{"id":{},"kind":{},"name":{},"character":{}},"required":["id","kind","name","character"]}},"charter":{},"charter_skill":{"items":{}},"charter_element":{"props":{"type":{"const":"law"},"id":{}},"required":["type","id"]},"charter_skill_elements":{"items":{"props":{"type":{"const":"object"},"id":{}},"required":["type","id"]}},"charter_text":{},"charter_text_more":{}},"required":["sponsor","sponsor_character","my_character","my_seats","charter","charter_skill","charter_element","charter_skill_elements","charter_text","charter_text_more"]},"reading_aids":{"props":{"charter":{"props":{"id":{},"type":{"const":"law"},"name":{},"rules":{"items":{}},"skill":{"items":{}}},"required":["id","type","name","rules","skill"]},"guide":{"props":{"id":{},"type":{"const":"construct"},"name":{}},"required":["id","type","name"]},"domains":{"items":{"props":{"id":{},"type":{"const":"construct"},"name":{},"sentence":{},"hubs":{"items":{"props":{"type":{},"id":{}},"required":["type","id"]}}},"required":["id","type","name","sentence","hubs"]}},"strand":{"props":{"narrative":{"props":{"id":{},"type":{"const":"narrative"},"name":{}},"required":["id","type","name"]},"event":{"props":{"id":{},"type":{"const":"event"},"name":{}},"required":["id","type","name"]},"location":{"props":{"id":{},"type":{"const":"location"},"name":{}},"required":["id","type","name"]},"character":{"props":{"id":{},"type":{"const":"character"},"name":{}},"required":["id","type","name"]},"now":{"props":{"id":{},"type":{"const":"location"},"name":{}},"required":["id","type","name"]},"same":{}},"required":["narrative","event","location","character","now","same"]}},"required":["charter","guide","domains","strand"]}},"required":["world","scope","kind","role","membership","character","lenses","lenses_from","front_door","reading_aids"]},
"GET /api/v2/members": {"props":{"data":{"items":{"props":{"id":{},"kind":{},"role":{},"character":{},"status":{},"name":{},"lenses":{"items":{}},"lenses_from":{},"sponsor_member":{},"x_served_trimmed":{"items":{"const":"lenses"}}},"required":["id","kind","role","character","status","lenses","lenses_from"]}}},"required":["data"]},
"GET /api/v2/me": {"props":{"world":{"props":{"id":{},"name":{}},"required":["id","name"]},"scope":{},"kind":{},"role":{},"membership":{},"character":{},"lenses":{"items":{}},"lenses_from":{},"x_served_trimmed":{"items":{"const":"lenses"}},"name":{},"ends_at":{},"front_door":{"props":{"sponsor":{"props":{"id":{},"kind":{},"name":{}},"required":["id","kind","name"]},"sponsor_character":{},"my_character":{},"my_seats":{"items":{"props":{"id":{},"kind":{},"name":{},"character":{}},"required":["id","kind","name","character"]}},"charter":{},"charter_skill":{"items":{}},"charter_element":{"props":{"type":{"const":"law"},"id":{}},"required":["type","id"]},"charter_skill_elements":{"items":{"props":{"type":{"const":"object"},"id":{}},"required":["type","id"]}},"charter_text":{},"charter_text_more":{}},"required":["sponsor","sponsor_character","my_character","my_seats","charter","charter_skill","charter_element","charter_skill_elements","charter_text","charter_text_more"]},"reading_aids":{"props":{"charter":{"props":{"id":{},"type":{"const":"law"},"name":{},"rules":{"items":{}},"skill":{"items":{}}},"required":["id","type","name","rules","skill"]},"guide":{"props":{"id":{},"type":{"const":"construct"},"name":{}},"required":["id","type","name"]},"domains":{"items":{"props":{"id":{},"type":{"const":"construct"},"name":{},"sentence":{},"hubs":{"items":{"props":{"type":{},"id":{}},"required":["type","id"]}}},"required":["id","type","name","sentence","hubs"]}},"strand":{"props":{"narrative":{"props":{"id":{},"type":{"const":"narrative"},"name":{}},"required":["id","type","name"]},"event":{"props":{"id":{},"type":{"const":"event"},"name":{}},"required":["id","type","name"]},"location":{"props":{"id":{},"type":{"const":"location"},"name":{}},"required":["id","type","name"]},"character":{"props":{"id":{},"type":{"const":"character"},"name":{}},"required":["id","type","name"]},"now":{"props":{"id":{},"type":{"const":"location"},"name":{}},"required":["id","type","name"]},"same":{}},"required":["narrative","event","location","character","now","same"]}},"required":["charter","guide","domains","strand"]}},"required":["world","scope","kind","role","membership","character","lenses","lenses_from","front_door","reading_aids"]},
"GET /api/v2/members": {"props":{"data":{"items":{"props":{"id":{},"kind":{},"role":{},"character":{},"status":{},"name":{},"lenses":{"items":{}},"lenses_from":{},"sponsor_member":{},"ends_at":{},"x_served_trimmed":{"items":{"const":"lenses"}}},"required":["id","kind","role","character","status","lenses","lenses_from"]}}},"required":["data"]},
"GET /api/v2/pin query": {"props":{"limit":{},"cursor":{},"expand":{},"fields":{},"name":{},"name__icontains":{},"supertype":{},"subtype":{},"map":{},"element":{},"ids":{},"created_by":{},"as":{},"world":{}},"required":[]},
"GET /api/v2/public/counts": {"props":{"worlds":{},"public_worlds":{},"elements":{},"kinds":{},"public":{"items":{"props":{"name":{},"address":{},"elements":{}},"required":["name","address","elements"]}},"counted_at":{}},"required":["worlds","public_worlds","elements","kinds","public","counted_at"]},
"GET /api/v2/search": {"$":"SearchResults"},
Expand All @@ -37,8 +37,8 @@
"POST /api/v2/bulk request": {"props":{"items":{"items":{"props":{"type":{},"element":{"unsaid":true}},"required":["type","element"]}},"atomic":{},"create_only":{}},"required":["items"]},
"POST /api/v2/character/{id}/files": {"props":{"ticket":{},"upload_url":{},"prefix":{},"key":{},"max_bytes":{},"exp":{},"uses":{"const":1},"issued_to":{"props":{"account":{},"membership":{}},"required":["account","membership"]},"kind":{"const":"file"},"file_id":{}},"required":["ticket","upload_url","prefix","key","max_bytes","exp","uses","issued_to","kind","file_id"]},
"POST /api/v2/character/{id}/files request": {"props":{"name":{},"kind":{},"size":{},"label":{}},"required":["name","kind","size"]},
"POST /api/v2/join": {"oneOf":[{"title":"AgentJoined","props":{"kind":{"const":"agent"},"world":{"props":{"id":{},"name":{},"description":{}},"required":["id","name","description"]},"seat":{"props":{"id":{},"agent_name":{},"role":{}},"required":["id","role","agent_name"]},"with_character":{},"character":{"props":{"id":{},"name":{}},"required":["id","name"]},"key":{},"pin":{},"base_url":{},"env":{},"next":{"items":{}},"members":{"items":{"props":{"id":{},"kind":{},"role":{},"character":{},"status":{},"name":{},"lenses":{"items":{}},"lenses_from":{},"sponsor_member":{},"x_served_trimmed":{"items":{"const":"lenses"}}},"required":["id","kind","role","character","status","lenses","lenses_from"]}},"front_door":{"props":{"sponsor":{"props":{"id":{},"kind":{},"name":{}},"required":["id","kind","name"]},"sponsor_character":{},"my_character":{},"my_seats":{"items":{"props":{"id":{},"kind":{},"name":{},"character":{}},"required":["id","kind","name","character"]}},"charter":{},"charter_skill":{"items":{}},"charter_element":{"props":{"type":{"const":"law"},"id":{}},"required":["type","id"]},"charter_skill_elements":{"items":{"props":{"type":{"const":"object"},"id":{}},"required":["type","id"]}},"charter_text":{},"charter_text_more":{}},"required":["sponsor","sponsor_character","my_character","my_seats","charter","charter_skill","charter_element","charter_skill_elements","charter_text","charter_text_more"]},"reading_aids":{"props":{"charter":{"props":{"id":{},"type":{"const":"law"},"name":{},"rules":{"items":{}},"skill":{"items":{}}},"required":["id","type","name","rules","skill"]},"guide":{"props":{"id":{},"type":{"const":"construct"},"name":{}},"required":["id","type","name"]},"domains":{"items":{"props":{"id":{},"type":{"const":"construct"},"name":{},"sentence":{},"hubs":{"items":{"props":{"type":{},"id":{}},"required":["type","id"]}}},"required":["id","type","name","sentence","hubs"]}},"strand":{"props":{"narrative":{"props":{"id":{},"type":{"const":"narrative"},"name":{}},"required":["id","type","name"]},"event":{"props":{"id":{},"type":{"const":"event"},"name":{}},"required":["id","type","name"]},"location":{"props":{"id":{},"type":{"const":"location"},"name":{}},"required":["id","type","name"]},"character":{"props":{"id":{},"type":{"const":"character"},"name":{}},"required":["id","type","name"]},"now":{"props":{"id":{},"type":{"const":"location"},"name":{}},"required":["id","type","name"]},"same":{}},"required":["narrative","event","location","character","now","same"]}},"required":["charter","guide","domains","strand"]}},"required":["kind","world","seat","with_character","character","key","pin","base_url","env","next","members","front_door","reading_aids"]},{"title":"PlayerJoined","props":{"kind":{"const":"player"},"key":{},"world":{"props":{"id":{},"name":{},"description":{}},"required":["id","name","description"]},"character":{"props":{"id":{},"name":{}},"required":["id","name"]},"role":{"const":"guest"}},"required":["kind","key","world","character","role"]}]},
"POST /api/v2/join/preview": {"props":{"reader":{},"world":{"props":{"name":{},"description":{}},"required":["name","description"]},"invited_by":{},"note":{},"owner_character":{},"character_name":{},"role":{},"with_character":{},"expires_at":{},"max_uses":{},"uses_left":{},"name_required":{},"characters":{"items":{"props":{"id":{},"name":{},"image_url":{},"taken":{}},"required":["id","name","image_url","taken"]}},"glimpse":{"props":{"picked_by":{},"things":{"items":{"props":{"name":{},"type":{}},"required":["name","type"]}},"links":{"items":{"props":{"from":{},"to":{},"field":{},"label":{}},"required":["from","to","field","label"]}}},"required":["picked_by","things","links"]}},"required":["reader","world","invited_by","note","owner_character","role","with_character","expires_at","glimpse"]},
"POST /api/v2/join": {"oneOf":[{"title":"AgentJoined","props":{"kind":{"const":"agent"},"world":{"props":{"id":{},"name":{},"description":{}},"required":["id","name","description"]},"seat":{"props":{"id":{},"agent_name":{},"role":{},"ends_at":{}},"required":["id","role","agent_name","ends_at"]},"with_character":{},"character":{"props":{"id":{},"name":{}},"required":["id","name"]},"key":{},"pin":{},"base_url":{},"env":{},"next":{"items":{}},"members":{"items":{"props":{"id":{},"kind":{},"role":{},"character":{},"status":{},"name":{},"lenses":{"items":{}},"lenses_from":{},"sponsor_member":{},"ends_at":{},"x_served_trimmed":{"items":{"const":"lenses"}}},"required":["id","kind","role","character","status","lenses","lenses_from"]}},"front_door":{"props":{"sponsor":{"props":{"id":{},"kind":{},"name":{}},"required":["id","kind","name"]},"sponsor_character":{},"my_character":{},"my_seats":{"items":{"props":{"id":{},"kind":{},"name":{},"character":{}},"required":["id","kind","name","character"]}},"charter":{},"charter_skill":{"items":{}},"charter_element":{"props":{"type":{"const":"law"},"id":{}},"required":["type","id"]},"charter_skill_elements":{"items":{"props":{"type":{"const":"object"},"id":{}},"required":["type","id"]}},"charter_text":{},"charter_text_more":{}},"required":["sponsor","sponsor_character","my_character","my_seats","charter","charter_skill","charter_element","charter_skill_elements","charter_text","charter_text_more"]},"reading_aids":{"props":{"charter":{"props":{"id":{},"type":{"const":"law"},"name":{},"rules":{"items":{}},"skill":{"items":{}}},"required":["id","type","name","rules","skill"]},"guide":{"props":{"id":{},"type":{"const":"construct"},"name":{}},"required":["id","type","name"]},"domains":{"items":{"props":{"id":{},"type":{"const":"construct"},"name":{},"sentence":{},"hubs":{"items":{"props":{"type":{},"id":{}},"required":["type","id"]}}},"required":["id","type","name","sentence","hubs"]}},"strand":{"props":{"narrative":{"props":{"id":{},"type":{"const":"narrative"},"name":{}},"required":["id","type","name"]},"event":{"props":{"id":{},"type":{"const":"event"},"name":{}},"required":["id","type","name"]},"location":{"props":{"id":{},"type":{"const":"location"},"name":{}},"required":["id","type","name"]},"character":{"props":{"id":{},"type":{"const":"character"},"name":{}},"required":["id","type","name"]},"now":{"props":{"id":{},"type":{"const":"location"},"name":{}},"required":["id","type","name"]},"same":{}},"required":["narrative","event","location","character","now","same"]}},"required":["charter","guide","domains","strand"]}},"required":["kind","world","seat","with_character","character","key","pin","base_url","env","next","members","front_door","reading_aids"]},{"title":"PlayerJoined","props":{"kind":{"const":"player"},"key":{},"world":{"props":{"id":{},"name":{},"description":{}},"required":["id","name","description"]},"character":{"props":{"id":{},"name":{}},"required":["id","name"]},"role":{"const":"guest"}},"required":["kind","key","world","character","role"]}]},
"POST /api/v2/join/preview": {"props":{"reader":{},"world":{"props":{"name":{},"description":{}},"required":["name","description"]},"invited_by":{},"note":{},"owner_character":{},"character_name":{},"role":{},"with_character":{},"expires_at":{},"visit_days":{},"max_uses":{},"uses_left":{},"name_required":{},"characters":{"items":{"props":{"id":{},"name":{},"image_url":{},"taken":{}},"required":["id","name","image_url","taken"]}},"glimpse":{"props":{"picked_by":{},"things":{"items":{"props":{"name":{},"type":{}},"required":["name","type"]}},"links":{"items":{"props":{"from":{},"to":{},"field":{},"label":{}},"required":["from","to","field","label"]}}},"required":["picked_by","things","links"]}},"required":["reader","world","invited_by","note","owner_character","role","with_character","expires_at","visit_days","glimpse"]},
"POST /api/v2/media/ticket": {"props":{"ticket":{},"upload_url":{},"prefix":{},"max_bytes":{},"exp":{},"uses":{"const":1},"issued_to":{"props":{"account":{},"membership":{}},"required":["account","membership"]}},"required":["ticket","upload_url","prefix","max_bytes","exp","uses","issued_to"]}
},
"defs": {
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"starlight-page-actions": "0.7.1"
},
"devDependencies": {
"@onlyworlds/sdk": "4.229.0",
"@onlyworlds/sdk": "4.230.0",
"typescript": "5.9.3"
},
"overrides": {
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/api/errors/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ A player opened a player link, a [table](/docs/development/api/members#a-table-o

The API key or PIN is missing, unknown or wrong.

- **Common cause:** no `API-Key` header, a mistyped key, or a missing or wrong `API-Pin` on a write. Only a legacy 10-digit key also needs the PIN to read a private world; prefixed keys (`ow_w_`, `ow_r_`) read without it. A deleted world's keys are deleted with it, so they also answer `invalid_credentials`.
- **Common cause:** no `API-Key` header, a mistyped key, or a missing or wrong `API-Pin` on a write. Only a legacy 10-digit key also needs the PIN to read a private world; prefixed keys (`ow_w_`, `ow_r_`) read without it. A deleted world's keys are deleted with it, so they also answer `invalid_credentials`. So does the key of an AI seat whose [visit](/docs/development/api/members#the-roster) has ended (since 2026-12-01), in words of its own: "Your visit to this world has ended, so this key no longer works. Ask the person who invited you for a new link."
- **How to fix:** check the `API-Key` and `API-Pin` headers (exact names) and that the key belongs to the world you mean. `param` tells the two apart: `API-Pin` on every PIN refusal, `null` for the key. The one other PIN refusal is a `pin` sent in the body of [`POST /api/v2/account/worlds`](/docs/getting-started/keys#account-tokens) or the hand-over by an account that has one (since 2026-11-07): `param` `pin`, message `Incorrect PIN.`, nothing made. The message then says which: `A PIN is required: send it as API-Pin.` when none was sent, `Incorrect PIN.` when it was wrong, `No valid API-Key.` for the key. A key that reads with `200` but writes with `401` has a wrong PIN: a read checks the PIN only when one is sent, so send it with a read (`GET /api/v2/me`) to test it. For a member's key, `GET /api/v2/me` checks the PIN (or a seat's secret) whenever one is sent; the member's other reads skip it. Keys are minted in the [account portal](https://www.onlyworlds.com/account/). The PIN is a 4-digit number (1000 to 9999) set on your account in [account settings](https://www.onlyworlds.com/account/settings), and it guards writes to every world you own; a member writes with their own account PIN, and an AI seat sends its seat secret (`ow_s_…`) as `API-Pin`. See [Keys and PINs](/docs/getting-started/keys#checking-the-pin).

### key_revoked
Expand Down
Loading
Loading