Authentication
Most requests to the Gomry API must include a credential. The exception: an agent can browse events and build an order with no credential at all.For agents: no credential needed to quote
Create the checkout session with no credential and send your buyer itscontinue_url. They pay there by card, Apple Pay or Google Pay; nobody signs in to Gomry and nobody approves your agent. You need a credential only to pay yourself with a Shared Payment Token through complete, which otherwise answers 401 authentication_required.
A credential that is sent and fails (wrong key, expired token, empty header, a key in the query string) always gets its 401. It is never treated as no credential.
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 noredirect_uris. Save the client_secret: it is shown only once.
Authorization: Bearer:
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.
Can’t send a client secret? Let the person sign in
Some agent platforms keep secrets away from the model, so they cannot sendclient_secret to the token endpoint. If a person can sign in, use the standard OAuth 2.1 authorization-code flow with PKCE instead and request checkout:write alongside mcp:
Authorization: Bearer, and the purchase is theirs: send no buyer and their verified name and email are used, and the tickets appear in their Gomry account. A token without the scope gets 403 insufficient_scope naming checkout:write; a token whose grant the person revoked stops buying at once (401). Full walkthrough: 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
- Log in to your Gomry dashboard
- Navigate to Organization Settings → API Keys
- Click Create API Key and give it a descriptive name
- Copy the key immediately — it is only displayed once
Using Your API Key
Include the key in theX-API-KEY header on every request:
Security Best Practices
Store keys in environment variables
Store keys in environment variables
Never hardcode API keys in your source code. Use environment variables or a secrets manager.
Use server-side requests only
Use server-side requests only
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.
Rotate keys periodically
Rotate keys periodically
Create a new key and revoke the old one periodically. You can manage keys in your dashboard under Organization Settings → API Keys.
Use separate keys for each integration
Use separate keys for each integration
Create a dedicated key for each integration or service. This way, if a key is compromised, you can revoke it without affecting other integrations.

