Integrate eNotif into your platform, A to Z

Everything a marketplace did to put eNotif first: sign-in without a password, the forgotten password confirmed on the phone, “Order with eNotif” on a product page and “Contact with eNotif” on a shop instead of a contact form, sellers invited to install eNotif. Start by copying the hosted code: one script, a few attributes, eNotif does the rest. The API comes next, for what must stay on your server.

0. Copy this code: the hosted widgets

One script, served by eNotif. It draws the official buttons (colours, logo, wording, waiting state) and keeps them up to date: nothing for you to maintain. It sets no cookie and loads nothing else.

HTML — once per page
<script src="https://enotif.sahelab.com/enotif.js?v=1" async></script>
The four widgets
<!-- 1. Sign-in: your route starts OpenID Connect (or data-start: POST → { url }) -->
<div data-enotif-connect data-href="/auth/enotif"></div>

<!-- 2. Contact: your server creates the pending action, eNotif opens on it -->
<div data-enotif-contact
     data-label="order"
     data-intent-endpoint="/api/listings/42/enotif"
     data-key="listing-42"
     data-status-endpoint="/api/enotif/contacts/{suivi}">
  <a href="https://wa.me/22370000002">WhatsApp</a>   <!-- your fallback, under the button -->
</div>

<!-- 3. The banner for a seller not on eNotif yet -->
<div data-enotif-seller-banner data-endpoint="/api/me/enotif"></div>

<!-- 4. A contact's status -->
<span data-enotif-status data-status="opened" data-at="2026-10-10T14:32:00Z"></span>
  • data-label: order on a product page (“Order with eNotif”), contact on a shop and anywhere else (“Contact with eNotif”, the default).
  • data-lang fr or en, data-theme red or light. CSS variables: --enotif-red, --enotif-red-dark, --enotif-ink, --enotif-radius.
  • A header or a body to send (the person’s session token)? Set it on the element: el.enotifRequest = { headers: { Authorization: 'Bearer …' }, body: { … } }.
  • The enotif:started (sign-in) and enotif:intent (contact) events carry your server’s answer; preventDefault() to navigate yourself.
  • React, Vue, Next.js: elements added later are picked up by themselves. In React, set enotifRequest in a ref.
Next.js / React
import Script from 'next/script'

export function OrderWithENotif({ listing }: { listing: string }) {
  return (
    <>
      <Script id="enotif" src="https://enotif.sahelab.com/enotif.js?v=1" strategy="afterInteractive" />
      <div
        ref={(el) => { if (el) (el as any).enotifRequest = { headers: { Authorization: `Bearer ${session()}` } } }}
        data-enotif-contact=""
        data-label="order"
        data-intent-endpoint={`/api/listings/${listing}/enotif`}
        data-key={`listing-${listing}`}
        data-status-endpoint="/api/enotif/contacts/{suivi}"
      />
    </>
  )
}

1. The application, the keys, Connect and the webhook

  1. Console › Applications › New: the name and logo people will see, your domains (links and returns only go there). Ask for verification: in production, only verified platforms write.
  2. Keys: an sk_test_ key to develop, an sk_live_ one once your account is accepted. They stay on your server.
  3. Connect: your return addresses (https://your-site.com/login/enotif, and http://localhost:3000/… in test). Copy the client id and secret.
  4. Webhooks: https://your-site.com/enotif/webhook, with the contact.*, intent.*, request.*, permission.revoked events. Keep the whsec_… secret.
Your server’s .env
ENOTIF_SECRET_KEY=sk_live_…
ENOTIF_CLIENT_ID=enc_live_…
ENOTIF_CLIENT_SECRET=ecs_live_…
ENOTIF_WEBHOOK_SECRET=whsec_…
Try it: test your key (GET /v1/ping) →

2. “Continue with eNotif” first

On sign-in, sign-up and the forgotten password, eNotif is the first choice; the password stays possible, behind a link.

What the person does

  • The first time, two gestures: their number, then “Yes, it’s me” on their phone. The request says what is shared (“Your name and your number”): that “yes” is the consent. There is no separate consent page.
  • Afterwards, one gesture: the browser remembers the number (“Continue as +223 70 •• •• 01”), and consent is not asked again. Pass login_hint (the number you know) for the same effect.
  • No eNotif yet? The page installs it by itself and keeps the request; it opens at first launch.

What your server does

Standard OpenID Connect: code + PKCE S256, an RS256 id_token checked against the JWKS. Match the account in this order: the sub already linked, else the verified number (phone_number_verified: true) equal to an account’s, else create the account. Someone already signed in on your side who links eNotif: pass your identifier in external_ref.

Laravel — the return
$person = Socialite::driver('enotif')->user();           // id_token checked
$phone = $person->user['phone_number'] ?? null;
abort_unless(($person->user['phone_number_verified'] ?? false) === true, 403);

$user = User::where('enotif_sub', $person->getId())->first()
    ?? User::where('phone', $phone)->first()
    ?? User::create(['phone' => $phone, 'name' => $person->getName()]);
$user->forceFill(['enotif_sub' => $person->getId()])->save();
Auth::login($user);

The forgotten password

Offer “Confirm on my eNotif phone” first: a password_reset request with number matching, then, once approved (check action and your external_ref in GET /v1/requests/{id}), your own “new password” screen. Answer the same way whether the number has an account or not.

curl
curl https://enotif.sahelab.com/v1/requests -H "Authorization: Bearer sk_test_…" -H "Content-Type: application/json" \
  -d '{ "phone": "+22370000001", "action": "password_reset", "title": "New password",
        "number_matching": true, "expires_in": 300, "external_ref": "42" }'
Try it: the button and OpenID discovery →

3. On the same phone

Everything happens by itself, with no choice screen

One tap on “Continue / Order / Contact with eNotif”, and eNotif picks the path:

  • eNotif installed (the Android app or the web app): it opens on the action. On Android, the /go/… page answers with an intent:// redirect that keeps the person’s tap; Chrome opens the app, or follows the fallback when it is not there.
  • Android, not installed: the APK downloads at once — “Open the downloaded file to install eNotif”. The web app’s install window can only open from a tap on an eNotif page (a browser rule): from your site, the download is the shortest path. The action is kept for that phone and opens after sign-up.
  • iPhone: the “Share → Add to Home Screen” steps show right away; the added app starts on the action, after sign-up.
  • Computer: the usual web sign-in, and the QR code for the phone.

On iPhone, honestly

iOS never opens a Home Screen web app from a link, and its data is not Safari’s. So the link opens in Safari, and eNotif does its best:

  • “Confirm with Face ID”, in Safari itself: the person turned on Face ID for links in eNotif (a passkey, shared by Safari and the Home Screen app through iCloud Keychain). It signs THIS order or THIS sign-in; no number, no app to open, then back to your page;
  • no passkey on this phone, and the person is known (you passed login_hint and that number is on eNotif): their iPhone rings at once, “Order from AlloTech?”, and the page only says “Tap the eNotif notification”;
  • otherwise: “Open eNotif from your Home Screen” — on launch, the app finds the action (same network, same kind of phone, 30 minutes);
  • no eNotif yet: the “Share → Add to Home Screen” steps, then the action.

That is one tap more than Android. A native iPhone app (with universal links) will remove it; it is planned.

  • https links, nothing else. Your site or app opens eNotif’s link; Android hands it to the eNotif app (verified App Links) or to the installed eNotif web app.
  • Back to the same tab. After “Yes, it’s me”, eNotif goes back to the previous app: the waiting tab sees the answer and goes on to your redirect_uri by itself. No new tab, PKCE intact. The eNotif web app, which cannot “go back”, says “go back to your browser”.
  • Your installed web app takes its links back: in your manifest, "scope": "/", "handle_links": "preferred", "launch_handler": { "client_mode": ["navigate-existing", "auto"] }.
  • Returns are declared: Connect addresses, “Return to your app” (console › Settings), allowed domains. An unknown address is refused.
Kotlin
startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(authorizeUrl)))
Node (Express) — start the sign-in
app.post('/api/enotif/start', async (req, res) => {
  const state = randomToken(), nonce = randomToken(), verifier = randomToken(48)
  await store.set(sha256(state), { verifier, nonce }, 600)          // the verifier stays here
  const url = new URL('https://enotif.sahelab.com/oauth/authorize')
  url.search = new URLSearchParams({ response_type: 'code', client_id: process.env.ENOTIF_CLIENT_ID,
    redirect_uri: 'https://your-site.com/login/enotif', scope: 'openid phone profile', state, nonce,
    code_challenge: s256(verifier), code_challenge_method: 'S256' })
  res.json({ url: url.toString(), state })                         // → data-start of enotif.js
})
Read: Continue with eNotif from an app →

4. “Order with eNotif”, the main button

On a product page, “Order with eNotif” comes first; on a shop (and anywhere else), it is “Contact with eNotif”. WhatsApp and the call stay right under it, one tap, nothing to fill in.

  1. Your server creates the pending action: POST /v1/intents with the listing, the seller, your reference and purpose (order or contact). Nothing is asked of the buyer on your site.
  2. The widget opens the /go/… link: the eNotif app asks “Order from Moussa: iPhone 13 — 250,000 FCFA?” (or “Contact Moussa?”), one tap, and the seller is told on behalf of the verified buyer. Without eNotif, it installs by itself (section 3) and keeps the action seven days.
  3. The seller does not have eNotif yet? With hold_if_unreachable: true, the contact waits seven days and reaches them when they sign up; the buyer reads so, and WhatsApp opens right after.
  4. A buyer signed in on your side: no button to tap, send the contact in the background when they tap WhatsApp — their usr_… if linked, otherwise your platform vouches for them (confirm: false, “via your platform”, no ✓).
  5. The status: “Seller told · seen at 14:32”, through the intent.completed then contact.* webhooks, or by reading GET /v1/intents/{id}.
Laravel — the pending action (data-intent-endpoint)
Route::post('/api/listings/{listing}/enotif', function (Listing $listing) {
    $tracking = Str::random(43);
    $intent = Http::withToken(config('services.enotif.secret'))->withHeaders(['Idempotency-Key' => (string) Str::uuid()])
        ->post('https://enotif.sahelab.com/v1/intents', [
            'kind' => 'contact',
            'purpose' => 'order',                                   // a shop: 'contact'
            'to' => $listing->seller->phone,
            'seller_name' => $listing->seller->name,
            'listing' => ['title' => $listing->title, 'image_url' => $listing->photo, 'price' => (string) $listing->price, 'currency' => 'XOF', 'url' => $listing->url],
            'external_ref' => $tracking,
            'return_url' => $listing->url,
            'hold_if_unreachable' => true,
        ])->throw()->json();
    Contact::create(['tracking' => hash('sha256', $tracking), 'intent' => $intent['id'], 'listing_id' => $listing->id]);

    return ['url' => $intent['url'], 'suivi' => $tracking];
});
curl — a signed-in buyer, vouched for by the platform
curl https://enotif.sahelab.com/v1/contacts -H "Authorization: Bearer sk_live_…" -H "Content-Type: application/json" \
  -d '{ "to": "+22370000002", "from": "+22370000001", "confirm": false, "from_name": "Awa Traoré",
        "listing": { "title": "iPhone 13, 128 GB", "price": "250000", "currency": "XOF" },
        "hold_if_unreachable": true }'
Read: Pending actions →   Try a contact →

5. Bringing sellers in

As long as a seller’s number is not on eNotif, show them the banner, on their dashboard and on every listing they edit. The counter does the rest: the contacts kept (held) reach them as soon as they sign up with the same number.

Node — the banner’s data-endpoint
app.get('/api/me/enotif', auth, async (req, res) => {
  const r = await fetch('https://enotif.sahelab.com/v1/discover', { method: 'POST', headers: { Authorization: `Bearer ${KEY}`, 'Content-Type': 'application/json' },
    body: JSON.stringify({ phone: req.user.phone }) }).then((x) => x.json())        // cache it
  res.json({ on_enotif: r.data[0].reachable, interested: await countHeldThisWeek(req.user), install_url: 'https://enotif.sahelab.com/pwa/?installer=1' })
})
Try it: Network Directory →

6. Webhooks

Check the signature on the raw body, refuse a call older than five minutes, handle each evt_… once, answer 200 fast.

Laravel
Route::post('/enotif/webhook', function (Request $request) {
    $body = $request->getContent();
    parse_str(str_replace(',', '&', (string) $request->header('X-ENotif-Signature')), $sig);
    $ok = isset($sig['t'], $sig['v1']) && abs(time() - (int) $sig['t']) <= 300
        && hash_equals(hash_hmac('sha256', $sig['t'].'.'.$body, config('services.enotif.webhook_secret')), $sig['v1']);
    abort_unless($ok, 400);

    $event = json_decode($body, true);
    if (! DB::table('enotif_events')->insertOrIgnore(['id' => $event['id']])) return response()->noContent(200);

    match ($event['type']) {
        'intent.completed' => Contact::where('intent', $event['data']['object']['id'])->update(['contact' => $event['data']['object']['contact']]),
        'contact.opened', 'contact.answered', 'contact.delivered' => Contact::updateFrom($event['data']['object']),
        'permission.revoked' => User::where('enotif_sub', $event['data']['object']['user'])->update(['enotif_sub' => null]),
        default => null,
    };

    return response()->noContent(200);
});
Node
app.post('/enotif/webhook', express.raw({ type: 'application/json' }), (req, res) => {
  const { t, v1 } = Object.fromEntries(req.get('X-ENotif-Signature').split(',').map((p) => p.split('=')))
  const mac = crypto.createHmac('sha256', process.env.ENOTIF_WEBHOOK_SECRET).update(`${t}.${req.body}`).digest('hex')
  if (Math.abs(Date.now() / 1000 - t) > 300 || !crypto.timingSafeEqual(Buffer.from(mac), Buffer.from(v1))) return res.sendStatus(400)
  const event = JSON.parse(req.body)
  if (!seen.add(event.id)) return res.sendStatus(200)   // already handled
  handle(event)
  res.sendStatus(200)
})
Read: verifying the signature →

7. Before going live

  1. An sk_test_ key, a test Connect client, a test webhook.
  2. Console › Testers: invite your own @handle, accept in the app.
  3. Console › Test: each feature, on your phone, until everything is ticked.
  4. Application verification asked for and granted; sk_live_ keys, production client and webhook.

Common mistakes

  • A return address that differs by one character (a trailing slash, http instead of https): refused.
  • The JSON decoded before checking the signature: it no longer matches.
  • The secret key in a web page or a mobile app: it stays on the server, always.
  • A form before WhatsApp: never block the usual contact; eNotif adds, it does not replace.
  • An action link opened in a new tab: keep the same tab, it waits for the answer.

The full API reference · Console › Test