Integration
Overview
The ReferralHero API is organized around REST. Our API has predictable, resource-oriented URLs. JSON is returned by all API responses, including errors.
1. Get Your ReferralHero Keys & Token
API Token: Retrieve your
API_TOKENfrom the ReferralHero Dashboard by navigating to -> API: ReferralHero Dashboard.

AirBridge App Credentials
If you already have an AirBridge account, keep your credentials ready.
If not — no worries, we’ll handle the setup for you.
Once you configure your referral tracking campaign and enable Mobile Apps, we’ll email you the required credentials for integration:
YOUR_APP_NAMEYOUR_APP_SDK_TOKEN
If you don’t receive the email, please contact ReferralHero Support at support@referralhero.com
2. Install Dependencies
Using NPM
Using yarn
3. Configure App
3.1 Android Configuration
a) Add Intent Filters in AndroidManifest.xml
Add under your <activity>:
Scheme Deep Link:
App Links:
b) Initialize SDK in MainApplication.kt
c) Track Deep Links in MainActivity.kt
3.2 iOS Configuration
a) Associated Domains
To configure:
Open your project in Xcode.
Navigate to Target → Signing & Capabilities.
Add a new Associated Domains entry.
Add an entry in the following format:
b) Initialize SDK in AppDelegate file
c) Handle Deep Links
4. Track Link Parameters in App
Place this code in the root file of your project. Fetch the required parameters and store them for later use in the Signup API. The two key parameters are:
visitor_id: The unique ID of the referred visitor who clicked the referral link. This must be included in the Signup API to track and attribute the referral upon signup.
referrer: The identifier of the original referrer. This is optional, as
visitor_idalone is sufficient for tracking the referral.
You can now use the visitor_id and referrer from the link when calling ReferralHero APIs during user registration and start tracking referrals!
For that, you will need 2 things:
Universal Link
Your Integrated App
The RH SDK Pulls information from your Device, like this:
Last updated