# Create an API key so your own tools can read your ticket sales | Guides Ticket Fairy

1. [Ticket Fairy](https://www.ticketfairy.com/)
2. [Guides](https://www.ticketfairy.com/fr/guides)
3. Create an API key so your own tools can read your ticket sales

Développeurs et API

# Create an API key so your own tools can read your ticket sales

An API key lets your own spreadsheet, dashboard or agent read what you can read, without a dashboard password changing hands. Promoters running more than a handful of events keep their ticket sales in the tools they already work in.

Give the command line, a script or an agent its own key to your ticket sales, choose how long it lasts, and take it back the moment you need to.

Pour:  Connecting your own tools, scripts or agents to your ticket sales

Durée:  7 minutes

- [Open your account settings](#step-1)
- [Name the token after the tool that will hold it](#step-2)
- [Choose how long it should last](#step-3)
- [Copy the token before you close the window](#step-4)
- [Generate the brand key for the event APIs](#step-5)

## Avant de commencer

- You know which tool needs the access: a laptop, a server, a scheduled script or an agent. One token per tool lets you take access back from one of them without touching the others.
- You have somewhere safe to keep the token, such as your password manager or your build system's secret store. The token is shown once and never again.

1. ## Open your account settings

   Open your account settings and find **Personal Access Tokens**.

   **Remarque:** These sit on your own account rather than on a brand, because a token carries your permissions. A teammate who needs their own access creates their own.
          ![Ticket Fairy Personal Access Tokens card listing tokens with their created, last used and expiry dates](https://www.ticketfairy.com/embeds/posters/marketing-developer-access--personal-access-tokens.png)    The tokens on an account, with one part-way through a rotation.
2. ## Name the token after the tool that will hold it

   Select **New Personal Access Token** and enter the tool's name in **Token name**.

   **Remarque:** Name it for the laptop, service or script rather than for the job, because the name is how you find the right row when you take access back.
3. ## Choose how long it should last

   Open **Set custom expiry** and pick a length that suits the tool.

   **Remarque:** A year is the default and the longest available. Pick an hour or seven days for a one-off script, because a short life limits what a leak costs you.
4. ## Copy the token before you close the window

   Select **Create token** and copy the value it shows you into your password manager.

   **Remarque:** The token is shown once. Close the window without copying it and the only way forward is to revoke that token and create another.
5. ## Generate the brand key for the event APIs

   Find **API Key** on the same page and select **Generate API Key**.

   **Remarque:** This is the key the event APIs ask for, the referral leaderboard among them. Regenerating it stops every application using the old key until you update them.
          ![Ticket Fairy API Key and Webhook API Key cards, each showing the key with a control to copy it and one to regenerate it](https://www.ticketfairy.com/embeds/posters/marketing-developer-access--api-keys.png)    The two keys, once each has been generated.

## Essayez ces étapes sur votre propre événement

Créez un compte gratuit, montez votre événement et suivez les étapes ci-dessus dans votre propre tableau de bord. Cela prend quelques minutes et vous n'avez pas besoin de réserver un appel commercial.

    Votre adresse e-mail    [Créer un compte gratuit](https://manage.ticketfairy.com/welcome) [Réserver une démo](https://www.ticketfairy.com/fr/event-ticketing/book-a-demo)

Pas de frais d'installation. Pas d'abonnement mensuel obligatoire. Pas de carte bancaire requise.

## Ou faites-le faire pour vous

Fai can open the page where the tokens live. Minting one is yours to do, because the token is shown once and only to you.

### Dans votre tableau de bord, avec Fai

Open my account settings so I can create an access token

### Depuis votre propre assistant, via MCP

Connectez votre assistant à [notre serveur MCP](https://www.ticketfairy.com/mcp-server) et demandez-lui :

Conservez `--read-only` dans votre configuration MCP. Cette tâche ne fait que lire des données, votre assistant n’a donc pas besoin d’outils qui effectuent des changements.

Pick the brand \<BRAND NAME\> and show its events

## Depuis votre terminal

Installez la CLI depuis [notre page CLI](https://www.ticketfairy.com/cli), connectez-vous avec `ticketfairy auth login`, puis choisissez la marque sur laquelle vous travaillez avec `ticketfairy brand use <BRAND_ID>`. `ticketfairy brand list` et `ticketfairy event list` affichent les identifiants utilisés par les autres commandes.

Sign the command line in with the token, then check which brands it reaches.

### Sign in with a token you have created

ticketfairy auth login

### Show the brands the token can act for

ticketfairy brand list

## Laissez Fai le faire pour vous

Fai travaille dans votre tableau de bord Ticket Fairy. Créez votre compte, ouvrez Fai et collez la consigne ci-dessus.

   [Créer un compte gratuit](https://manage.ticketfairy.com/welcome) [Réserver une démo](https://www.ticketfairy.com/fr/event-ticketing/book-a-demo)

Pas de frais d'installation. Pas d'abonnement mensuel obligatoire. Pas de carte bancaire requise.

## Swap a token without any downtime

1. ### Rotate it instead of replacing it

   Select **Rotate** on the row and copy the new token.

   **Remarque:** Rotating mints a fresh token under the same name and leaves the old one working for a grace period. Update every script and service before that window ends.
2. ### Tell the two rows apart afterwards

   Look for the badge marking the older half of the rotation before you remove anything.

   **Remarque:** Both rows carry the same name, so the badge is what stops you taking the fresh token out of service by mistake.

Fai can open the page. Rotating and copying the new token stay with you, because the value is shown once and only to you.

### Dans votre tableau de bord, avec Fai

Open my account settings so I can rotate an access token

### Depuis votre propre assistant, via MCP

Conservez `--read-only` dans votre configuration MCP. Cette tâche ne fait que lire des données, votre assistant n’a donc pas besoin d’outils qui effectuent des changements.

Pick the brand \<BRAND NAME\> and show its events

### Depuis votre terminal

Sign in again with the new token.

#### Sign in with the token you copied

ticketfairy auth login

## Take access back

1. ### Revoke the token the moment it leaks

   Select **Revoke** on the row for the tool that is affected.

   **Remarque:** Revoking stops that token immediately and cannot be undone. The tool needs a new token before it works again.

Fai can open the page. Revoking is yours to confirm, because it stops a live integration the moment it happens.

### Dans votre tableau de bord, avec Fai

Open my account settings so I can revoke an access token

### Depuis votre propre assistant, via MCP

Conservez `--read-only` dans votre configuration MCP. Cette tâche ne fait que lire des données, votre assistant n’a donc pas besoin d’outils qui effectuent des changements.

Pick the brand \<BRAND NAME\> and show its events

### Depuis votre terminal

Check what the remaining tokens still reach.

#### Show the brands the current token can act for

ticketfairy brand list

## Questions que vous pourriez avoir

Which one do I use for the command line?:  A personal access token. The command line, your own scripts and your agents all sign in with one, and each inherits the permissions your dashboard account has.

What is the API key for, then?:  The event APIs, such as your referral leaderboard. It is issued against the account that asks for it, so a tool meant to outlive one person needs a key from an account that stays on the team.

Can a token do everything I can?:  Within your permissions, yes. That is why one token per tool and a short expiry are worth the extra minute, and why revoking is instant and never rate limited.

How many tokens can I create?:  Ten an hour, counting rotations, and you cannot create a new one while fifty are already live. Waiting clears the hourly count; the fifty needs you to revoke one you have finished with. A rotation is exempt from the fifty, so it can hold fifty-one until the old token runs out its grace period.

What if I close the window without copying the token?:  Revoke that token and create another. The value is never shown again, so there is nothing to recover and nothing lost by starting over.

## Vous avez encore une question ?

Réservez une démo et nous y répondrons lors d'un appel, pour votre type d'événement. Ou créez votre compte et voyez par vous-même.

   [Réserver une démo](https://www.ticketfairy.com/fr/event-ticketing/book-a-demo) [Créer un compte gratuit](https://manage.ticketfairy.com/welcome)

Pas de frais d'installation. Pas d'abonnement mensuel obligatoire. Pas de carte bancaire requise.

## Guides associés

- [D’autres façons d’utiliser Ticket Fairy](https://www.ticketfairy.com/fr/event-ticketing/features)
- [Recevez un webhook à chaque commande de billet](https://www.ticketfairy.com/fr/guides/get-a-webhook-when-a-ticket-sells)
- [Vendre des billets directement depuis votre propre site web](https://www.ticketfairy.com/fr/guides/sell-tickets-on-your-own-website)
- [Invite your team to your events and choose what each person can do](https://www.ticketfairy.com/fr/guides/invite-your-team)
- [Tous les guides Ticket Fairy](https://www.ticketfairy.com/fr/guides)

## Faites-le sur votre propre événement

Créez votre compte, montez votre événement et suivez les étapes dans votre propre tableau de bord. Vous n’avez pas besoin de réserver un appel commercial.

  [Créer un compte gratuit](https://manage.ticketfairy.com/welcome) [Réserver une démo](https://www.ticketfairy.com/fr/event-ticketing/book-a-demo)

## Vendez des billets avec Ticket Fairy

Tout ce qui figure dans ces guides est dans votre tableau de bord dès le jour de votre inscription.

- Montez votre événement en quelques minutes
- Les événements gratuits sont gratuits
- Fai, votre copilote, est intégrée

 [Créer un compte gratuit](https://manage.ticketfairy.com/welcome)

Pas de frais d'installation. Pas d'abonnement mensuel obligatoire. Pas de carte bancaire requise.

## Voyez-le lors d'un appel

Réservez une démo et nous vous montrerons comment Ticket Fairy gère votre type d'événement.

 [Réserver une démo](https://www.ticketfairy.com/fr/event-ticketing/book-a-demo) [D’autres façons d’utiliser Ticket Fairy](https://www.ticketfairy.com/fr/event-ticketing/features)

### Des conseils pour vendre plus de billets

Des conseils pratiques d'organisateurs qui affichent complet, et chaque nouveau guide dès sa publication.

Nous respectons votre vie privée. Désabonnement à tout moment.
