---
title: "Slack"
description: "Intégrez Slack avec Adapty pour recevoir des notifications en temps réel sur les événements d'abonnement."
---

[Slack](https://slack.com/) est une messagerie d'équipe et une plateforme de productivité qui ne nécessite probablement aucune présentation.

Grâce à cette intégration, vous recevrez une notification dans Slack chaque fois qu'un événement de revenu est enregistré par Adapty. Cela peut être utile si vous souhaitez savourer chaque instant où votre MRR augmente, ou si vous voulez surveiller les annulations d'essai, les problèmes de facturation, les remboursements, et bien plus encore.

## Comment configurer l'intégration Slack \{#how-to-set-up-slack-integration\}

Vous devrez :

- créer une application dans votre espace de travail Slack
- lui donner la permission de publier des messages
- puis fournir les informations nécessaires à Adapty dans [Integrations → Slack](https://app.adapty.io/integrations/slack).

### 1\. Créer une application dans Slack \{#1-create-an-app-in-slack\}

1. Rendez-vous sur le [tableau de bord de l'API Slack](https://api.slack.com/apps) et créez une application comme suit :

  <img src="/assets/shared/img/f43aedc-CleanShot_2024-01-04_at_18.27.412x.webp"
  style={{
    border: 'none', /* border width and color */
    width: '700px', /* image width */
    display: 'block', /* for alignment */
    margin: '0 auto' /* center alignment */
  }}
/>

  <img src="/assets/shared/img/08fa9e6-CleanShot_2024-01-04_at_18.28.142x.webp"
  style={{
    border: 'none', /* border width and color */
    width: '700px', /* image width */
    display: 'block', /* for alignment */
    margin: '0 auto' /* center alignment */
  }}
/>

2. Donnez-lui un nom (`Adapty` par exemple) et ajoutez-le à votre espace de travail :

  <img src="/assets/shared/img/5002bb1-CleanShot_2024-01-04_at_18.29.132x.webp"
  style={{
    border: 'none', /* border width and color */
    width: '700px', /* image width */
    display: 'block', /* for alignment */
    margin: '0 auto' /* center alignment */
  }}
/>

### 2\. Accorder l'autorisation de publier et obtenir un token pour votre application \{#2-give-permission-to-post-and-get-a-token-for-your-app\}

Vous serez redirigé vers la page de votre application dans Slack.

1. Faites défiler vers le bas et cliquez sur **Permissions** :

  <img src="/assets/shared/img/9750451-CleanShot_2024-01-04_at_18.48.072x.webp"
  style={{
    border: 'none', /* border width and color */
    width: '700px', /* image width */
    display: 'block', /* for alignment */
    margin: '0 auto' /* center alignment */
  }}
/>

2. Après la redirection, faites défiler jusqu'à **Scopes** et cliquez sur **Add an OAuth Scope** :

  <img src="/assets/shared/img/db5b5f4-CleanShot_2024-01-04_at_18.50.262x.webp"
  style={{
    border: 'none', /* border width and color */
    width: '700px', /* image width */
    display: 'block', /* for alignment */
    margin: '0 auto' /* center alignment */
  }}
/>

3. Accordez les permissions `chat:write`, `chat:write.public` et `chat:write.customize`. Elles sont nécessaires pour publier dans vos canaux et personnaliser les messages :

  <img src="/assets/shared/img/d97ccb9-CleanShot_2024-01-04_at_18.51.572x.webp"
  style={{
    border: 'none', /* border width and color */
    width: '700px', /* image width */
    display: 'block', /* for alignment */
    margin: '0 auto' /* center alignment */
  }}
/>

4. Remontez en haut de la page et cliquez sur **Install to Workspace** :

  <img src="/assets/shared/img/14608e3-CleanShot_2024-01-04_at_19.17.58.webp"
  style={{
    border: 'none', /* border width and color */
    width: '700px', /* image width */
    display: 'block', /* for alignment */
    margin: '0 auto' /* center alignment */
  }}
/>

5. Cliquez sur **Allow** ici :

  <img src="/assets/shared/img/143967e-CleanShot_2024-01-04_at_18.53.292x.webp"
  style={{
    border: 'none', /* border width and color */
    width: '700px', /* image width */
    display: 'block', /* for alignment */
    margin: '0 auto' /* center alignment */
  }}
/>

Après cela, vous serez redirigé vers la même page, mais vous aurez un OAuth Token disponible (`xoxb-...`). C'est exactement ce dont vous avez besoin pour finaliser la configuration :

  <img src="/assets/shared/img/59b33ee-CleanShot_2024-01-04_at_18.55.222x.webp"
  style={{
    border: 'none', /* border width and color */
    width: '700px', /* image width */
    display: 'block', /* for alignment */
    margin: '0 auto' /* center alignment */
  }}
/>

### 3\. Configurer l'intégration dans Adapty \{#configure-the-integration-in-adapty\}

1. Accédez à [**Integrations** → **Slack**](https://app.adapty.io/integrations/slack) :

  <img src="/assets/shared/img/b4ffd71-CleanShot_2024-01-04_at_19.05.222x.webp"
  style={{
    border: 'none', /* border width and color */
    width: '700px', /* image width */
    display: 'block', /* for alignment */
    margin: '0 auto' /* center alignment */
  }}
/>

2. Collez le jeton `xoxb-...` de l'étape précédente et choisissez les canaux sur lesquels l'application publiera. Vous pouvez configurer l'intégration pour recevoir des événements uniquement en production, en sandbox, ou les deux. Vous pouvez également choisir la devise d'affichage (originale ou convertie en USD).

  :::note
  Si vous souhaitez publier des messages d'Adapty dans un canal privé, vous devrez ajouter manuellement l'application `Adapty` que vous avez créée dans Slack à ce canal. Sinon, cela ne fonctionnera pas.
  :::

3. Enfin, vous pouvez choisir les événements que vous souhaitez recevoir sous **Events** :

  <img src="/assets/shared/img/970a7bb-CleanShot_2024-01-04_at_19.09.472x.webp"
  style={{
    border: 'none', /* border width and color */
    width: '700px', /* image width */
    display: 'block', /* for alignment */
    margin: '0 auto' /* center alignment */
  }}
/>

C'est tout !

Les événements seront envoyés aux canaux que vous avez spécifiés. Vous pourrez consulter les revenus le cas échéant et voir le profil client dans Adapty :

  <img src="/assets/shared/img/852b8c8-CleanShot_2024-01-04_at_19.11.332x.webp"
  style={{
    border: 'none', /* border width and color */
    width: '700px', /* image width */
    display: 'block', /* for alignment */
    margin: '0 auto' /* center alignment */
  }}
/>

## Dépannage \{#troubleshooting\}

### `access_level_updated` apparaît comme échoué dans le flux d'événements \{#access-level-updated-shows-as-failed-in-the-event-feed\}

`access_level_updated` est un **événement réservé aux webhooks**. Adapty ne l'envoie jamais à cette intégration. Mais Adapty enregistre un résultat pour chaque intégration activée, et un événement non pris en charge est affiché comme un échec.