Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AppsFlyer OneLink Automation

Automate the creation of AppsFlyer OneLink deep links and QR codes using Playwright browser automation.

Features

  • Bulk OneLink Creation - Generate multiple OneLinks from a configuration file
  • QR Code Export - Automatically download QR codes as SVG files
  • Session Persistence - Login once, reuse authentication for subsequent runs
  • Customizable Parameters - Configure deep link values and promo codes per link

Use Cases

  • Generate personalized referral links with unique promo codes
  • Create QR codes for marketing campaigns at scale
  • Automate repetitive OneLink creation tasks in AppsFlyer dashboard

Prerequisites

  • Node.js 18+
  • An AppsFlyer account with OneLink access
  • At least one existing OneLink template to duplicate

Installation

git clone https://github.com/stefanminch/appsflyer-onelink-automation.git
cd appsflyer-onelink-automation
npm install
npx playwright install chromium

Usage

1. Login to AppsFlyer

Run the login command to authenticate and save your session:

npm run login

A browser window will open. Log in to your AppsFlyer account manually, then press Enter in the terminal when you see the OneLink dashboard.

2. Configure Your Links

Edit src/link-data.ts to define the links you want to create:

export const linksToCreate: LinkConfig[] = [
  { filename: 'campaign-summer', deepLinkValue: 'SUMMER24', promoCode: 'SUMMER24' },
  { filename: 'campaign-winter', deepLinkValue: 'WINTER24', promoCode: 'WINTER24' },
];
Field Description
filename Name for the downloaded SVG file
deepLinkValue Value for Deep linking & redirection > Deep link value
promoCode Value for Attribution parameters > promo_code

3. Create Links

Run the automation to create all configured links:

npm start

QR code SVGs will be saved to the downloads/ folder.

Create a Single Link

To create just one link by index:

npm run create-link 0  # Creates the first link in the array

Configuration

Edit src/config.ts to customize behavior:

export const config = {
  headless: false,  // Set to true for background execution
  slowMo: 100,      // Delay between actions in ms (for debugging)
};

How It Works

  1. Opens the AppsFlyer OneLink dashboard
  2. Duplicates the first OneLink in your list
  3. Updates the deep link value and promo code
  4. Creates the link and downloads the QR code as SVG
  5. Repeats for each link in your configuration

Troubleshooting

"Auth file not found" - Run npm run login first to authenticate.

Links not being created - Ensure you have at least one existing OneLink to duplicate. The script duplicates the first link in your OneLink list.

Session expired - Re-run npm run login to refresh your authentication.

Tech Stack

License

MIT

About

Browser automation tool for generating AppsFlyer OneLink deep links and QR codes at scale

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages