Skip to main content

Requirements

  • Windows operating system.
  • C/C++ compiler (Visual Studio recommended).
  • Assigned App ID from Bright SDK Dashboard.
1

Create App ID on Dashboard

If you haven’t done this yet, log in to your Bright SDK Dashboard and create your app ID first.Format: Your assigned App ID uniquely identifies your application and associates the peers provided by your application with you in the Bright Data network.
2

Install SDK Files

You can set up the Bright SDK in your .NET Windows app in two ways:
  • Using the Bright SDK integration CLI tool Recommended - automatically downloads the SDK, copies the required files, and patches your .csproj with the necessary references.
  • Manually - download the SDK from the sdk downloader and copy the files yourself.
Either way, you will still need to add the SDK initialization code to your app.
Download the latest Bright SDK using the Bright SDK downloader, unzip it.Once you unzip the SDK, the following files are of interest:
File (32-bit)File (64-bit)Description
net_updater32.exenet_updater64.exeBright Data Windows service installer, uninstaller and entry point
lum_sdk32.dlllum_sdk64.dllC++ native API
lum_sdk32.liblum_sdk64.libLink lib for `lum_sdk(3264).dll`
lum_sdk.hlum_sdk.hHeader file to include in C/C++ binaries (imports with *_c suffix are c-style)
brd_config.jsonbrd_config.jsonConsent configuration and customization
Important: lum_sdk.dll, net_updater32.exe and brd_config.json files must be located next to each other when running the application.
3

Integrate Bright SDK in Your Code

Add SDK Files to Your SolutionMicrosoft Visual C/C++ AppUse vc++_console_64bit from samples directory for reference. Add the following files to your project:
  • lum_sdk.h
  • lum_sdk(32|64).lib
  • lum_sdk(32|64).dll
  • brd_config.json
Make sure lum_sdk(32|64).dll and brd_config.json are copied to the output folder.
If you used the CLI tool in Option A, skip copying lum_sdk.dll and brd_config.json - they are already in place in BrightSDK/ and app/. You still need to add lum_sdk.h, lum_sdk(32|64).lib to your project and ensure all files are copied to the output folder.
Non-Microsoft or Non-C Apps
  • Use the equivalent to LoadLibrary & GetProcAddress in your language/compiler.
  • Load all xxx_c method variants you require from lum_sdk32.dll.
  • Don’t forget to include the dll in your app package.
  • Once imported, use same API flow as in previous implementation sample.
All included samples in the SDK package should compile and run as-is (Note: some of the more exotic samples are not verified for each release).
Add SDK Initialization to Your Code
  1. Configure and initialize Bright SDK during your application’s startup initialization.
  2. Set required fields (use brd_config.json and/or set them programmatically - see API Documentation).
  3. Call brd_sdk_init().
  4. Write handler code for the user choice change event.
    • For example: enable/disable ads or premium features. Close the SDK when your application is exiting.
brd_sdk_init() will show a consent screen to the user only if the user hasn’t seen the consent screen before (didn’t agree or disagree). You can disable consent on init completely with brd_sdk_set_skip_consent_on_init(TRUE) and manually show it later with brd_sdk_show_consent().
See Code Example at the end of the guide.
4

Add Opt-In/Out Settings Option

Critical Requirement: The user must always be able to opt-out of Bright SDK after giving their initial consent.
Regardless of the user’s initial choice, you must add an option for users to opt-in/out at any time. This is usually placed in the settings menu.
Every time the user toggles Web Indexing ON, the consent screen must reappear — regardless of any previous opt-in.
Adding Opt-In/Out to Your Existing Settings Menu:
  1. Add a switch (checkbox/toggle button) labeled “Web Indexing”:
    • Must clearly reflect current status (opted-in or opted-out).
    • Should be checked if BrightData.Api.ConsentChoice is true.
    • Unchecking it should call BrightData.Api.OptOut().
    • Checking it should call BrightData.Api.ShowConsent().
  2. Add value text below the switch:
  3. Include a “Learn More” option:
  4. UX Guidelines:
    • You’re free to choose the UX (radio button, switch, etc.).
    • The opt-out option must be clearly labeled.
    • Users must be able to freely opt-out.
See Code Examples at the end of the guide:
Ensure the opt-out functionality is fully implemented before submitting for review. Bright Data will verify both UX and functionality during the approval process.
Examples of opted-in and opted-out scenarios:
opt-in-out-windows-1

opt-in-out-windows-2

opt-in-out-windows-3

opt-in-out-windows-4

Value Text Examples:
When opted-out:When opted-in:
Enable to see fewer adsWhen enabled you see fewer ads
Enable to get 100 extra coinsWhen enabled you get 100 extra coins
Enable to enjoy premium featuresWhen enabled you enjoy premium features
Enable to get 2 free carsWhen enabled you get 2 free cars
Enable to unlock more levelsWhen enabled you unlock more levels
Common Mistakes to Avoid:
ExampleIssue
Label: “Bright SDK”❌ Label should be “Web Indexing”, not “Bright/Bright SDK”
Switch without value text❌ Missing text emphasizing value to users
Switch without status indicator❌ Switch should clearly show current opt-in/opt-out status
No “Learn More” option❌ Missing link/QR code to information page
You may add pop-up/confirmation dialogs to:
  • Discourage opt-out: “If you disable Web Indexing, you will start seeing ads. Do you want to see ads?”
  • Confirm opt-out: “You have successfully disabled Web Indexing. You may enable it again anytime from the settings menu.”
You are responsible for the text and design. These will be reviewed before publishing.
Opt-Out Messages examples:
opt-in-out-windows-5

opt-in-out-windows-6

5

Update Application Installer

Install:
  1. Add the following text to your installation wizard under “License agreement”:
{App name} installs Bright Data components (no execution).
You will be able to view the component details in full before you accept this offer, as well as being able to turn Bright Data on and off directly from the 'App Settings'. Read more about Bright Data's EULA here.
  1. Add step to deploy the following to your install directory:
    • lum_sdk.dll
    • net_updater32.exe
    • Brd_config.json
  2. Add step to execute Bright Data service installer during app installation (recommended, optional):
    • Process to start: net_updater32.exe --install-ui APPID It will show the consent screen and if agreed, install the service.
  3. Run net_updater32.exe -h in command prompt to see available --dlg- parameters, or set them in brd_config.json.
  4. Wait for the process to finish before proceeding.
Uninstall:Add the following to your application’s uninstall script:
  1. Make sure no process uses lum_sdk.dll (terminate your application).
  2. Uninstall Bright Data service and remove all SDK files by executing  net_updater32.exe --uninstall APPID.
  3. Wait for uninstall to finish before proceeding.
Update:Add the following to your application’s update script:
  1. Stop your application (which is using lum_sdk.dll).
  2. Stop Bright Data service: luminati_net_updater_APPID
    • Where APPID is your assigned APPID with . (dot) replaced with _ (underscore).
    • Example: win_abc.myapp.comluminati_net_updater_win_abc_myapp_com.
  3. Deploy new files:
    • net_updater32.exe
    • lum_sdk.dll
    • Brd_config.json your
  4. Choose one option:
    1. Option A: Install new net_updater : net_updater32.exe --install-ui APPID 
      • Shows consent to user (they can accept or decline).
      • Requires admin privileges.
      • Use brd_config.json for consent customization.
    2. Option B: Restart service if it exists
      • Does not require admin privileges.
      • Does not show consent.
6

Add SDK Service Status Notifications (Optional)

NotificationsYou can register your app for notifications about the SDK service status. This allows you to:
  • Know if the SDK is in a valid usable state.
  • Prevent users from receiving benefits until they restore the SDK service.
ImplementationRegister a notification callback using the brd_sdk_set_service_status_change_cb() API. The callback function should be of the brd_sdk_service_status_change_t type.See service_status_t enum for more information on the different statuses.
The callback function can be called from a different thread than the one used to register the callback.
RecoveryIf the service_status_t is SERVICE_STATUS_NOT_INSTALLED, SERVICE_STATUS_INSTALLED, or SERVICE_STATUS_NOT_RUNNING, you can use the brd_sdk_fix_service_status() API to trigger automatic recovery.You can also trigger this on user action (e.g., “Click here to fix Bright Data SDK and regain benefit”).
8

Self-Check Your Integration

Testing ModeYou may set BrightData.Api.Settings.TestMode = true while developing. This way the BrightData service will not be installed when you accept the consent screen, making it easier to develop.Resetting During TestingWhile testing, you can:
  1. Opt-out through settings
    • Remove Bright Data service by opting out through your application settings.
    • Delete the luminati folder (or your entire output folder).
    • This resets your consent choice.
    • Consent screen will display next time you run the application.
  2. Uninstall via command
    • Execute net_updater32.exe --uninstall APPID in your output folder.
    • This deletes all SDK files.
Self-check using an emulator/simulator is not yet supported. Currently, self-check can only be performed on a real device.
If the SDK isn’t initializing / peer not connecting:
  1. Verify the correct App ID is used, confirm the SDK service is running.
  2. Check there aren’t multiple SDK apps running from the same IP — that can interfere.
  3. If nothing helps, check with our team.
9

Update Your Terms of Service

Bright Data ensures users are fully informed about joining the peer network.Add the following text to your Terms of Service web page (TOS, EULA, or Privacy Policy):In return for premium features of ‘[Your App Name]’, you may choose to be a peer on the Bright Data network. By doing so, you agree to have read and accepted the Bright SDK EULA and Bright Data’s Privacy Policy.You may opt out of the Bright Data network by [add clear opt-out instructions].Requirements:
  1. Include all text and links as provided above.
  2. Any additional Bright SDK-related content must be shared during the app review process for approval.
10

Submit Your Integration for Review

11

How to Update SDK

  1. Download the latest SDK using the Bright SDK downloader.
  2. Replace the following files with the newer versions:
    • net_updater32.exe (or net_updater64.exe)
    • lum_sdk.dll (or lum_sdk32.dll / lum_sdk64.dll for C/C++)
    • brd_config.json
  3. Clean and rebuild your project.
12

Code Example

#include "lum_sdk.h"

void WINAPI brd_choice_change_cb(int choice)
{
    if (choice == LUM_SDK_CHOICE_PEER)
    {
        // user agreed to Bright Data consent
        // you can disable ads here, for example
    }
    else
    {
        // user disagreed to the consent or opted out
        // you can enable ads here, for example
    }
}

void WINAPI brd_service_status_change_cb(int status)
{
    if (!brd_sdk_get_consent_choice())
        return;
    if (status == SERVICE_STATUS_NOT_INSTALLED)
    {
        // optional: notify user about SDK service not installed and offer to recover
        // optional: automatically try and recover (might cause bad UX)
        if (userWantsToRecover || autoRecoverIsEnabled)
            brd_sdk_fix_service_status();
    }
    else if (status == SERVICE_STATUS_INSTALLED || status == SERVICE_STATUS_NOT_RUNNING)
    {
        // optional: notify user about SDK service not running and offer to recover
        // optional: automatically try and recover (might cause bad UX)
        if (userWantsToRecover || autoRecoverIsEnabled)
            brd_sdk_fix_service_status();
    }
}

int _tmain(int argc, _TCHAR* argv[])
{
    brd_sdk_set_appid("APPID_GOES_HERE");
    brd_sdk_set_app_name("APP_NAME_GOES_HERE");
    brd_sdk_set_logo_link("URL_TO_YOUR_APP_LOGO_GOES_HERE");
    brd_sdk_set_choice_change_cb(brd_choice_change_cb);
    brd_sdk_set_service_status_change_cb(brd_service_status_change_cb);
    brd_sdk_init();

    // run your application
    brd_sdk_close();
    return 0;
}
13

API Documentation

  • Settings in brd_config.json are shared by both lum_sdk.dll and net_updater32.exe.
  • You can use the config file together with the programmatic API.
  • Programmatic API settings take precedence over config file settings.
Required Properties
PropertyTypeDescription
app_idstringYour APPID
app_namestringFriendly name of your app that appears on the consent screen
logo_linkstringURL to your app’s logo for the consent screen
Optional Properties
PropertyTypeDescription
benefitstringDescription of benefits user gets when enabling SDK. Changes consent screen wording. Becomes the first part of the first sentence on the consent screen
agree_btnstringText of the consent screen’s agree button
disagree_btnstringText of the consent screen’s disagree button
opt_out_txtstringText of the consent screen’s opt-out instructions
Core Methods
MethodDescription
brd_sdk_init()Initializes Bright SDK. Should be called during app initialization. All other methods will be accessible afterwards. By default, consent screen will be shown if the user hasn’t made a choice yet, but can be skipped with brd_sdk_set_skip_consent_on_init(TRUE)
brd_sdk_show_consent()Displays consent screen. (Clears user choice and removes Brightdata service if installed.) Can be used when a user tries to close an ad or clicks the checkbox to activate Bright SDK
brd_sdk_opt_out()Disables Bright SDK and removes Brightdata service. Consent choice will change to LUM_SDK_CHOICE_NOT_PEER
brd_sdk_close()Closes Bright SDK. Should be called when the application exits if the SDK cannot automatically detect the application exit and keeps running, keeping the app process running
char * brd_sdk_get_uuid()Returns the peer’s unique identifier. Useful for debugging
Properties
MethodDescriptionReturn Values
int brd_sdk_get_consent_choice()Returns the user’s consent choiceLUM_SDK_CHOICE_NONE (=0) - no choice yet
LUM_SDK_CHOICE_PEER (=1) - agreed
LUM_SDK_CHOICE_NOT_PEER (=2) - disagreed
int brd_sdk_is_supported()Return whether machine supports minimum .NET version required to run
Callbacks
MethodDescription
brd_sdk_set_choice_change_cb(brd_sdk_choice_change_t cb)Sets a callback function that is invoked when the user’s consent choice has changed. For example when they accepted the consent or they disabled Bright SDK through your application settings
brd_sdk_set_on_dialog_shown_cb(brd_sdk_on_dialog_shown_t cb)Sets a callback function that is invoked when the consent dialog is shown
brd_sdk_set_on_dialog_closed_cb(brd_sdk_on_dialog_closed_t cb)Sets a callback function that is invoked when the consent dialog is closed
Required Settings
MethodDescription
brd_sdk_set_appid(char *appid)Your APPID. Required if not provided in brd_config.json file
brd_sdk_set_app_name(char *app_name)Friendly name of your app that will appear on the consent screen. Required if not provided in brd_config.json file
brd_sdk_set_logo_link(char *logo_link)URL to your app’s logo that will appear on the consent screen. Required if not provided in brd_config.json file
Basic Configuration
MethodDescription
brd_sdk_set_skip_consent_on_init(BOOLEAN skip_consent)If TRUE, init method will not show consent screen. The consent screen can be shown later with the brd_sdk_show_consent method. Default FALSE
brd_sdk_set_benefit(char *benefit_txt)Description of the benefits a user gets if he/she consents to enable Bright SDK. Consent screen will have different wordings if set. The value will be the first part of the first sentence on the consent screen
brd_sdk_set_opt_out_txt(char *opt_out_txt)Text of the consent screen’s opt-out instructions
brd_sdk_set_campaign(char *camp)Optional parameter for the further breakdown of the existing app ID to monitor the statistics separately
Localization
MethodDescription
brd_sdk_set_lang(char *lang)Language code for consent screen language. Default value: “en-US”. Supported: en-US, de-De, es-Es, fr-FR, it-IT, pt-PT, ru-RU, zh-CN
Visual Customization
MethodDescription
brd_sdk_set_txt_color(char *txt_color)Color of the consent text. Format: hex argb, “#AABBCCDD”. Optional
brd_sdk_set_app_name_color(char *app_name_color)Color of the application name text. Format: hex argb, “#AABBCCDD”. Optional
brd_sdk_set_bright_data_logo_color(char *bright_data_logo_color)Color of the BrightData logo background. Format: hex argb, “#AABBCCDD”. Optional
brd_sdk_set_bg_color(char *bg_color)Background color of the consent screen. Format: hex argb, “#AABBCCDD”. Optional
brd_sdk_set_btn_color(char *btn_color)Button color of the consent screen. Format: hex argb, “#AABBCCDD”. Optional
The same functions as above with a _c suffix, e.g., brdsdk_init_c().
net_updater(32|64).exe Command Line Arguments.Help & Information
ArgumentDescription
-hPrint command descriptions
Service Management
ArgumentDescription
--install-ui appidInstall service with provided appid after showing dialog and getting user permission
--check-peer appidValidate peer
--uninstall appidRemove service with provided appid (must match appid used during install)
--start-service appidStarts Bright Data service
--stop-service appidStops Bright Data service
Dialog Customization
ArgumentDescription
--dlg-language cultureLanguage code for consent screen language. Default value: “en-US”. Supported: en-US, de-De, es-Es, fr-FR, it-IT, pt-PT, ru-RU, zh-CN
--dlg-app-name nameFriendly name of your app that will appear on the consent screen
--dlg-logo-link logoURL to your app’s logo that will appear on the consent screen
--dlg-benefit benefitDescription of the benefits a user gets if he/she consents to enable Bright SDK. Consent screen will have different wordings if set. The value will be the first part of the first sentence on the consent screen
--dlg-agree-btn textText of the consent screen’s agree button
--dlg-disagree-btn textText of the consent screen’s disagree button
Analytics
ArgumentDescription
--campaign campaign_idOptional parameter for the further breakdown of the existing app ID to monitor the statistics separately