Connectby Nevorai

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")

  1. 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.
  2. 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)

  1. 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.

  1. The return page (redirect_uri) receives ?code=…&state=… (or ?error=access_denied). Check state, 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}".

  1. Use it. Send messages with the Send API (Authorization: Bearer nck_…, see send-api); post each new lead as JSON to lead_url when 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.

Rules