feat: add external API for publishing posts with image URL and scheduling

- New POST /api/v1/publish endpoint: download image from URL, create post and schedule it per page
- New GET /api/v1/pages endpoint: list available pages for external callers
- API key auth via X-API-Key header, configurable from admin settings (stored in DB)
- New app_config table (migration included) to store the external API key
- Admin-only settings section (desktop + mobile) to set/revoke the key
- Fallback to EXTERNAL_API_KEY env var if no DB key is configured

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
MichaelandClaude Sonnet 4.6 committed 2026-05-06 13:12:27 +02:00
1 parent 9e6fe9fe31
commit 391acfdb83
9 files changed
+539 -2

No files matched your search

+7
View File
@@ -37,3 +37,10 @@ MINIO_PUBLIC_URL=https://media.example.com
# Optionnel: Configuration Instagram API
# INSTAGRAM_APP_ID=
# INSTAGRAM_APP_SECRET=
# ==========================================
# API EXTERNE
# ==========================================
# Clé d'accès pour l'API externe /api/v1/*
# Générer avec: openssl rand -hex 32
EXTERNAL_API_KEY=your-secure-random-key-here