Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.nomos.energy/llms.txt

Use this file to discover all available pages before exploring further.

Drop authenticated customers straight into the portal

Once a customer is signed in to your own app, hand them off to the hosted Nomos portal as a fully logged-in user. Your backend calls Create a magic link with the customer’s id, gets back a short-lived URL, and redirects the customer there. The portal verifies the token, creates a session, and reuses it on subsequent visits until the session expires.
Customer's account hub in the hosted portal with quick links to data, invoices, orders, tariff, and help

Where to mint and where to redirect

The endpoint is server-only. The resulting URL is safe to send to the browser; the access token used to mint it is not. The simplest pattern: a handler in your app mints the link and redirects.
app.get("/portal", requireAuth, async (req, res) => {
  const link = await mintNomosMagicLink(req.user.nomosCustomerId);
  res.redirect(link);
});
An “Open energy account” button becomes a plain link to /portal; every click mints a fresh, single-use URL. In a mobile app, mint from your backend and open in an in-app webview (SFSafariViewController on iOS, Custom Tabs on Android, a WebView in React Native). The customer stays inside your app shell while the portal renders inside.
If the customer exists on Nomos but has no subscription yet, the response URL points at the hosted checkout for your plan (/start) instead. The same call always lands the customer in the right place.

FAQ

Fetch the full record of the subscription and use subscription.customer. Use the subscription.created webhook when a subscription is first created to get the subscription id. Persist it on your user record.
Magic-link sessions are independent of any other Nomos sessions. Signing out on one device or expiring a session won’t affect a separate magic-link session minted from your backend.