Shopify
Bau Shopify-Apps mit Astrologie-Funktionen oder bind Widgets mit der Occult API ein.
Shopify-App
Erstell eine Shopify-App mit einem Backend-Server, der die Occult API aufruft. Das Backend übernimmt die Authentifizierung und reicht Anfragen als Proxy weiter – so bleibt dein API-Schlüssel geschützt.
Node.js-Backend
Bau eine Express-Route, die Horoskopdaten von der Occult API abruft und an das Shopify-Frontend zurückgibt.
app.post('/api/horoscope', async (req, res) => {
const response = await fetch('${API_DOCS_URL}/api/astro/rashifal/daily/', {
method: 'POST',
headers: {
'X-API-Key': process.env.OCCULT_API_KEY,
'Content-Type': 'application/json',
},
body: JSON.stringify({ rashi: req.body.sign }),
});
const data = await response.json();
res.json(data);
});Eingebettetes Widget
Mit der App Bridge von Shopify zeigst du das Widget im Admin-Dashboard oder im Shop an. Das Widget holt sich personalisierte Astrologie-Inhalte von deinem Backend.