Keep the URL in one place

Tokens come from the API itself (POST /token/create), so the base URL is the only one a client needs. Every example on this site reads it from an environment variable and falls back to the one above, so a change of URL is configuration and not code:
A token from the Live API’s POST /v2/token/create works here too, so a client that already has one need not create another. In the API reference, the playground’s server list names the environment each request goes to.

Before going live

  • Do not depend on a token lifetime. Create a new token whenever a call answers 401, as the automation example does; it works whatever the lifetime is.
  • Pin a build. A project keeps its buildVersion, but a new project gets the default build of the day. Name the build you tested on in POST /projects if it must not change.
  • Browser uploads need your origin allowed. See From a browser.
  • Give players and partners the project’s feed URL. An output feed is published under the API base URL and is public, so it needs no token.