Shopify
Build astrology-powered Shopify apps or embed widgets using Occult API.
Shopify App
Create a Shopify app with a backend server that calls Occult API. The backend handles authentication and proxies requests to keep your API key secure.
Node.js Backend
Implement an Express route that fetches horoscope data from Occult API and returns it to the Shopify frontend.
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);
});Embedded Widget
Use Shopify's App Bridge to render the widget in the admin dashboard or storefront. The widget communicates with your backend to display personalized astrology content.