Docs/Widgets & Deep Links

React components (coming soon)

A React component package (@rehabify/react) is planned but not yet published. Here's how to integrate from a React or Next.js app today.

Coming soon
The @rehabify/react package hasn't been published yet, so there's nothing to install. Any install command or component import you may have seen for it is out of date.

Integrating from React or Next.js today

Don't call the Partner API from the browser. Your secret key would be exposed, and partner endpoints don't send CORS headers. Use one of these patterns instead:

  1. Server-side referral. Your React app posts to your own backend (for example, a Next.js Route Handler or Server Action). The backend calls POST /partners/referrals with the key from a server-only environment variable, and returns the tracking_code and links.whatsapp_intake_url to the browser.
  2. Referral link. Render a link or button that opens your referral link at https://physioaroundme.com/r/<public_code>. This requires no backend.
  3. Your own form, posted to the public lead endpoint. Submit the form from the browser to the public lead endpoint. It's CORS-enabled and needs no API key. Include an explicit, unticked consent checkbox.

The server-side pattern keeps your key in a server environment variable, such as REHABIFY_API_KEY. Never use a NEXT_PUBLIC_ variable for it.

We'll document the component package here when it's published.

React components (coming soon) | Rehabify Docs | Physio Around Me by Rehabify Health