AuthentifizierungAuthentication
Jeder API-Call muss mit einem gültigen API-Key authentifiziert werden. BEEP! nutzt ein Publishable/Secret-Key-Paar, ähnlich wie Stripe.
Every API call must be authenticated with a valid API key. BEEP! uses a Publishable/Secret key pair, similar to Stripe.
SchlüsseltypenKey Types
Dein Dashboard enthält zwei Schlüssel pro Modus (Test & Live):
Your dashboard contains two keys per mode (Test & Live):
| TypType | Prefix | VerwendungUsage |
|---|---|---|
| Publishable Key (pk) | bk_{mode}_pk_… | Client-seitig erlaubt, identifiziert deinen AccountAllowed client-side, identifies your account |
| Secret Key (sk) | bk_{mode}_sk_… | Nur serverseitig! Voller API-Zugang, nie committenServer-side only! Full API access, never commit |
Test Mode vs. Live ModeTest Mode vs. Live Mode
Jeder Account hat zwei isolierte Umgebungen:
Every account has two isolated environments:
| EigenschaftProperty | Test ModeTest Mode | Live Mode |
|---|---|---|
| Key-Prefix | bk_test_ | bk_live_ |
| DatenData | Sandbox-Mock-DatenSandbox mock data | Echte Store-DatenReal store data |
| ZahlungenPayments | Stripe Test Mode | Echte TransaktionenReal transactions |
| Rate Limits | UnbegrenztUnlimited | PaketabhängigPackage-dependent |
| VoraussetzungRequirement | Kostenloser AccountFree account | Aktives Abo + manueller ReviewActive subscription + manual review |
Authorization Header
Sende den Key als Bearer-Token im Authorization-Header:
Send the key as a Bearer token in the Authorization header:
X-Beep-Store-Id: {storeId}, damit kannst du Store-spezifische Calls machen, ohne die storeId im Body zu übergeben.X-Beep-Store-Id: {storeId} lets you make store-specific calls without passing storeId in the body.Key-Format (Anatomie)Key Format (Anatomy)
Jeder Key folgt diesem Muster:
Every key follows this pattern:
SicherheitshinweiseSecurity Notes
- Secret Keys werden nie im Klartext in Firestore gespeichert, nur als SHA-256 Hash.Secret Keys are never stored in plain text in Firestore, only as SHA-256 hash.
- Validierung erfolgt über
crypto.timingSafeEqual(verhindert Timing-Attacks). - Rotiere Keys regelmäßig über das Dashboard → „Schlüssel rotieren".
- Bei Kompromittierung: Key im Dashboard sofort widerrufen. Der alte Key wird instant ungültig.If compromised: revoke the key immediately in the Dashboard. The old key becomes invalid instantly.
- Live-Keys benötigen einen manuellen Review durch das BEEP!-Team (Aktivierungsantrag).Live keys require a manual review by the BEEP! team (activation request).
Paket-BerechtigungenPackage Permissions
Welche Endpoints dein Key aufrufen darf, hängt vom Paket ab:
Which endpoints your key may call depends on your package:
| PaketPackage | Endpoints |
|---|---|
| DISCOVER | Stores, Produkte, Katalog (fetchStores, fetchProducts, insertProduct, bulkImportProducts …)Stores, products, catalog (fetchStores, fetchProducts, insertProduct, bulkImportProducts …) |
| ASSIST | = DISCOVER + In-Store-Chat (Chat läuft über Firestore)In-Store Chat (Chat runs via Firestore) |
| GO | = ASSIST + AngeboteOffers (createOffer, updateOffer …) + Click & Collect |
| GROW | = GO + Scan & Go (checkIn, startCheckout …) + POS/ERP/PSP-Sync |
| PRIME | Alle Endpoints + Analytics-Export + Premium SupportAll endpoints + Analytics export + Premium support |