Media

Get a ticket for one image upload

Changed on

A write key and its PIN (owner, classic, member and AI seat keys alike). No body. Returns a short-lived, single-use ticket that upload_url accepts for exactly one image upload into this world's prefix. The API never sees the image. Each ticket counts toward the world's daily limit, and each upload toward its account's image storage (1 GB by default).

post/api/v2/media/ticket

Request

  • Base URL
    https://www.onlyworlds.com
  • Auth
    API key in header API-Key and API key in header API-Pin

Response

A ticket for one image upload. Cache-Control: no-store.

object required
ticket, string required

Opaque to clients: send it to upload_url as is.

upload_url, string required

Where the image goes, with the ticket.

prefix, string required

u/<world_id>/: the object key prefix this world's uploads land under.

max_bytes, integer required

The most this ticket accepts: the per-image limit, or what the account has left, whichever is smaller.

exp, integer required

Unix seconds after which the ticket is refused.

uses, 1 required

One ticket, one upload.

issued_to, object required

Who answers for the upload; it is recorded with the stored image. Owner and classic keys: the owner's account, membership null. A member key: the member's account and membership. An AI seat: its sponsor's account and the seat's id.

Changes

    • info

      added the optional property error/limit to the response with the status

    • info

      added the optional property error/limit to the response with the status

    • info

      added the optional property error/limit to the response with the status

    1 more change in this revision