Skip to main content

Authentication

All requests to the Gomry API must include a credential. There are two kinds:

For agents: get a credential yourself

You do not need an API key or a human to browse the catalog or buy tickets. Register once, then exchange your secret for a token whenever you need one. 1. Register (once). Send no redirect_uris. Save the client_secret: it is shown only once.
2. Get an access token. Tokens last 15 minutes and there is no refresh token: request a new one with the same secret.
3. Call the API with Authorization: Bearer:
The token response says scope: checkout:write. That is expected: catalog read access comes with it. Every endpoint outside the catalog and checkout answers 403, because this credential belongs to no organization. Full walkthrough, including payment: gomry.com/auth.md.

For integrations: organization API keys

Organization API keys are scoped to your organization and gated by a per-resource scope map that controls which resources the key can read or write. See Scopes for the full list and how to configure them.

Generating an API Key

  1. Log in to your Gomry dashboard
  2. Navigate to Organization Settings → API Keys
  3. Click Create API Key and give it a descriptive name
  4. Copy the key immediately — it is only displayed once
Treat your API key like a password. Anyone with your key can read your organization’s event data. Never commit it to version control or expose it in client-side code.

Using Your API Key

Include the key in the X-API-KEY header on every request:

Security Best Practices

Never hardcode API keys in your source code. Use environment variables or a secrets manager.
API keys should only be used in server-side code. Never include them in frontend JavaScript, mobile apps, or any code that runs on user devices.
Create a new key and revoke the old one periodically. You can manage keys in your dashboard under Organization Settings → API Keys.
Create a dedicated key for each integration or service. This way, if a key is compromised, you can revoke it without affecting other integrations.

Authentication Errors