38 lines
1003 B
Markdown
38 lines
1003 B
Markdown
# Selfhost-Instanz anbinden
|
|
|
|
1. Instanz im Admin-Dashboard anlegen.
|
|
2. `instanceId` und den einmalig angezeigten `clientSecret` in der Selfhost-Instanz speichern.
|
|
3. Selfhost-Instanz sendet regelmäßig `POST /v1/instances/heartbeat`.
|
|
4. Geräte werden über `POST /v1/devices` registriert.
|
|
5. Push-Aufträge werden über `POST /v1/push` gesendet.
|
|
|
|
## Umgebungsvariablen der Selfhost-Instanz
|
|
|
|
```env
|
|
FEDEO_PUSH_MODE=central
|
|
FEDEO_PUSH_GATEWAY_URL=https://push.fedeo.cloud
|
|
FEDEO_PUSH_INSTANCE_ID=inst_...
|
|
FEDEO_PUSH_CLIENT_SECRET=fps_...
|
|
FEDEO_PUSH_PAYLOAD_MODE=minimal
|
|
```
|
|
|
|
## Minimaler Push-Auftrag
|
|
|
|
```json
|
|
{
|
|
"idempotencyKey": "notification-item-id:dev_...",
|
|
"devices": ["dev_..."],
|
|
"priority": "normal",
|
|
"ttlSeconds": 3600,
|
|
"collapseKey": "communication.message.new",
|
|
"notification": {
|
|
"title": "Neue FEDEO-Benachrichtigung",
|
|
"body": "Öffne FEDEO, um die Details anzusehen."
|
|
},
|
|
"data": {
|
|
"notificationId": "lokale-notification-id",
|
|
"link": "/communication"
|
|
}
|
|
}
|
|
```
|