The "Connect" button: adding Nevorai Connect to a product
> Building your own software for other businesses? You can register your own app yourself, with no one at Nevorai involved: Connectors → Developers → Make an app (see "Your own app" below). Just connecting your own site? You don't need this: see the website snippet (one line), events and the Connect API.
For Nevorai's own products (Landing Page OS, Academy OS, AdsPro, …). The owner taps Connect WhatsApp inside the product, approves on connect.nevorai.com, and the product gets a private key for THAT business only. Nothing to paste.
One-time setup (Adarsh, Platform → "Apps that can connect")
- Register the product: short name (e.g.
lpos), the name people see, its return address (e.g.https://lpos.nevorai.com/connect/done), optionally where its Connect button starts, and tick "sends leads in" for AdsPro. - Connect shows the app's secret once. Put it in the product's own settings as
CONNECT_APP_SECRET(never in chat).
What the product does (3 small pieces)
- The button sends the browser to
https://connect.nevorai.com/connect/authorize?app=lpos&redirect_uri=<return address>&state=<random>&ref=<this client's id in your product> Keep state (a random string) in the session to check on return. ref is optional and is how the product remembers which of ITS clients this is; connecting the same ref again replaces the earlier connection.
- The return page (
redirect_uri) receives?code=…&state=…(or?error=access_denied). Checkstate, then on the SERVER:
`` POST https://connect.nevorai.com/api/connect/token { "app": "lpos", "secret": "<CONNECT_APP_SECRET>", "code": "<code>" } → { "api_key": "nck_…", "business": "Sai Sports", "lead_url": null | "https://connect.nevorai.com/api/hooks/nch_…", "connection_id": "…", "base_url": "https://connect.nevorai.com" } ` A code works once and for 60 seconds. Store api_key (and lead_url` if given) under that client, encrypted. Show "Connected ✓ {business}".
- Use it. Send messages with the Send API (
Authorization: Bearer nck_…, see send-api); post each new lead as JSON tolead_urlwhen there is one.
Your own app (no Nevorai step)
Any business owner can register an app: Connectors → Developers → Make an app. You give it a name, a one-line description and the return address(es) (https only; http only for localhost). Connect makes the app id (like d-ab12cd34) and shows the secret once. Then follow "What the product does" above with that id.
- Your app starts not checked by Nevorai. When another business's owner taps Allow, they see "Nevorai hasn't checked this app. It was made by <your business> and sends you back to <your address>" and must tick "I know and trust this app". Your own business never sees the warning, and your app is not listed in other businesses' Connectors until Nevorai marks it checked.
- You can register up to 5 apps. Names can't look like Nevorai's ("Nevorai…", "Kaizen…") or repeat an existing app's name.
- Turn off or Delete an app and every business connected to it is disconnected at once: all their keys stop working. Nevorai can also turn any app off.
- Apps registered by Nevorai (Landing Page OS, AdsPro, …) keep working exactly as before and show no warning.
Rules
- The return address must be registered exactly (origin + path); anything else is refused, so nobody can steal a key by faking the link.
- Only a business OWNER can approve. The owner sees "Nevorai apps" on Connectors and can Disconnect: the key stops at once and the lead link goes off.
- One key per business per app. The product never sees other businesses' data.
- Lost the secret? Platform → the app → New secret (the old one stops working).