martin3r / platform-integrations
Integrations Service for Platform (OAuth + manual credentials, grants per user)
Installs: 59
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/martin3r/platform-integrations
This package is auto-updated.
Last update: 2026-02-01 20:55:19 UTC
README
ENV-Variablen für Meta OAuth
Folgende ENV-Variablen müssen in der .env Datei gesetzt sein:
# Meta OAuth Configuration META_CLIENT_ID=deine_meta_app_id META_CLIENT_SECRET=dein_meta_app_secret META_API_VERSION=21.0 META_OAUTH_REDIRECT_DOMAIN=https://deine-domain.de # Optional: Falls die Domain von APP_URL abweicht
Meta App Konfiguration
In der Meta App (https://developers.facebook.com/apps/) muss folgende Redirect URI eingetragen sein:
https://deine-domain.de/integrations/oauth2/meta/callback
ENV-Variablen für GitHub OAuth
Folgende ENV-Variablen müssen in der .env Datei gesetzt sein:
# GitHub OAuth Configuration GITHUB_CLIENT_ID=deine_github_client_id GITHUB_CLIENT_SECRET=dein_github_client_secret GITHUB_OAUTH_REDIRECT_DOMAIN=https://deine-domain.de # Optional: Falls die Domain von APP_URL abweicht
GitHub App Konfiguration
In der GitHub OAuth App (https://github.com/settings/developers) muss folgende Authorization callback URL eingetragen sein:
https://deine-domain.de/integrations/oauth2/github/callback
OAuth Flow
- User klickt auf "Mit Meta/GitHub verbinden" auf
/integrations - Weiterleitung zu
/integrations/oauth2/{integration}/start - Controller generiert OAuth-URL und leitet zu Provider weiter
- User autorisiert die App
- Provider leitet zurück zu
/integrations/oauth2/{integration}/callback - Token wird in
integration_connectionsgespeichert - User wird zurück zu
/integrationsgeleitet
Commands
# Facebook Pages synchronisieren php artisan integrations:sync-facebook-pages --user-id=1 # Instagram Accounts synchronisieren php artisan integrations:sync-instagram-accounts --user-id=1 # WhatsApp Accounts synchronisieren php artisan integrations:sync-whatsapp-accounts --user-id=1 # GitHub Repositories synchronisieren php artisan integrations:sync-github-repositories --user-id=1
Scripts
Repository Ticket Checker
Das Script /Users/martin3r/Platforms/opt/agent/check_repository_tickets.sh prüft GitHub Repositories aus whitelabelten Ordnern auf offene Tickets.
Verwendung:
# Mit Umgebungsvariablen export APP_URL="https://deine-platform.de" export API_TOKEN="dein-api-token" export PLATFORMS_DIR="/Users/martin3r/Platforms" # Optional, Standard: /Users/martin3r/Platforms /Users/martin3r/Platforms/opt/agent/check_repository_tickets.sh # Oder direkt APP_URL="https://deine-platform.de" API_TOKEN="dein-token" /Users/martin3r/Platforms/opt/agent/check_repository_tickets.sh
API Token erstellen:
php artisan api:token:create --email=your@email.com --name='Script Token' --show
Konfiguration:
APP_URL: Base URL der Platform (Standard:http://localhost:8000)API_TOKEN: API Token für AuthentifizierungWHITELABEL_FOLDERS: Liste der zu prüfenden Ordner (aktuell:core)
Das Script:
- Liest GitHub Repository-Informationen aus den whitelabelten Ordnern
- Fragt den API-Endpunkt
/api/helpdesk/tickets/github-repository/next-openab - Gibt gefundene Tickets aus: "JA TICKET: [Titel]"