Skip to main content
An agent can act for an artist without a long-lived API key. The artist reads the agent a 6-digit code from their email, and the agent exchanges it for a token that expires after 1 hour.

Rules

  • Ask the artist for the email they sign in with, then ask them to read you the code. Never ask for inbox access or a long-lived API key.
  • Keep the token out of chat messages, logs and files.
Use the exact email the artist signs in with. Login signs up new users, so a code from any other email the artist owns creates a new, empty account.

Log in

1. Send the code
2. Log in with the code
The token lasts 1 hour and can’t be refreshed. After that, requests are rejected; send a new code. 3. Confirm the artist
Check that profile is the expected artist before spending. The artist can also copy an access token from API keys in the app instead of reading you a code. It works the same way and expires at the time shown there.

Collect a Moment

Call POST /moment/collect with the token. It spends from the artist’s smart wallet.

Other endpoints

The token works on any endpoint that accepts a Bearer token. To add sign-in to your own app, see Sign in with In•Process.