Wiki 42 Deutsch Get notified

Help · Sharing and settings

Access for apps: API keys

Wiki 42 has an HTTP API with JSON, the same one used by the web and iPhone apps. Your own script or tool can use it with an API key, without you being signed in. You don’t need this for everyday use of the app.

  1. On “Home”, tap the wiki’s name at the top, then “All wikis”. The gear opens “Kosmos settings”. “Access for apps” is at the bottom.

    The bottom of Kosmos settings with the “Access for apps” section, three API keys and the “Create API key” row
  2. Tap “Create API key” and give it a name that will remind you what it’s for. Below that, choose what it can access: all wikis in the Kosmos or individual ones, each with “Read only” or “Read and write”. Under “Valid for”, choose when the key expires.

    The “Create API key” sheet with the name, the choice of wikis with “Read only” or “Read and write”, and the expiry
  3. Tap “Create API key” at the bottom. The key is now shown, just this once. Use “Copy” or “Share” to put it where your program needs it.

    The “Your API key” sheet with the key, a note that it won’t be shown again and the “Copy”, “Share” and “Done” buttons
  4. The list shows what each key can do, when it expires and when it was last used. Use the three dots to “Rename” or “Revoke” it.

Good to know

  • Treat the key like a password. Anyone who has it can do whatever you’ve allowed it to do.
  • A key applies to one Kosmos and can never do more than you can. No key can invite members, grant permissions or delete a wiki.
  • Revoking a key takes effect immediately: programs using it can no longer get in. If you leave the Kosmos, your keys there stop working.
  • Anyone who manages the Kosmos can also see and revoke other members’ keys.
  • Each person can have up to ten keys per Kosmos.
  • The script sends the key with each request in the “Authorization: Bearer w42_…” header to the API at your wiki’s address, https://my.wiki42.app/api/ for the cloud version. GET /api/me tells you who the key belongs to and what it applies to.
  • Anything a program adds or asks counts the same as in the app, including costs.
  • In the browser, the same section is in Kosmos settings.