Skip to Content
Nouvelle documentation Applite - JS SDK, Dart SDK & REST API
REST APITokens de Notification

API Tokens de Notification

Endpoints pour la gestion des tokens de notification push des clients.

SDK: client.notificationToken

Endpoints

Enregistrer un token

Enregistre ou met à jour un token de notification pour un client.

POST /app/{appId}/customer/{customerId}/notification-token/set
ChampTypeRequisDescription
apiKeystringOuiClé API
tokenstringOuiToken de notification (FCM, APNs, etc.)
platformstringOuiPlateforme: IOS, ANDROID, WEB
deviceIdstringNonIdentifiant unique de l’appareil
deviceNamestringNonNom de l’appareil (ex: “iPhone de Jean”)
curl -X POST https://api.applite.ai/app/{appId}/customer/{customerId}/notification-token/set \ -H "Content-Type: application/json" \ -d '{ "apiKey": "your_api_key", "token": "fcm_token_abc123...", "platform": "ANDROID", "deviceId": "device_unique_id", "deviceName": "Samsung Galaxy S21" }'

Si le token existe déjà pour ce client, il sera mis à jour avec les nouvelles informations d’appareil.


Supprimer un token

Supprime un token de notification spécifique (déconnexion d’un appareil).

POST /app/{appId}/customer/{customerId}/notification-token/remove
ChampTypeRequisDescription
apiKeystringOuiClé API
tokenstringOuiToken à supprimer
curl -X POST https://api.applite.ai/app/{appId}/customer/{customerId}/notification-token/remove \ -H "Content-Type: application/json" \ -d '{ "apiKey": "your_api_key", "token": "fcm_token_abc123..." }'

Supprimer tous les tokens

Supprime tous les tokens d’un client (déconnexion de tous les appareils).

POST /app/{appId}/customer/{customerId}/notification-token/remove-all
ChampTypeRequisDescription
apiKeystringOuiClé API
curl -X POST https://api.applite.ai/app/{appId}/customer/{customerId}/notification-token/remove-all \ -H "Content-Type: application/json" \ -d '{ "apiKey": "your_api_key" }'

Utilisez cette méthode avec précaution. Elle déconnecte le client de tous ses appareils.


Lister les tokens

Liste tous les tokens de notification d’un client.

POST /app/{appId}/customer/{customerId}/notification-token/list
ChampTypeRequisDescription
apiKeystringOuiClé API
curl -X POST https://api.applite.ai/app/{appId}/customer/{customerId}/notification-token/list \ -H "Content-Type: application/json" \ -d '{ "apiKey": "your_api_key" }'

Plateformes supportées

PlateformeDescription
IOSApple Push Notification service (APNs)
ANDROIDFirebase Cloud Messaging (FCM)
WEBWeb Push Notifications
Last updated on