Set up projects using API

Step 1: Create an Adrop project

Before you can add Adrop to your project, you need to create an Adrop project to connect to your app.

Step 2: Register your app with Adrop

To use Adrop in your Web app, you need to register your app with your Adrop project. Registering your app is often called "adding" your app to your project.

Using Web app builder
  1. Go to the Adrop console.

  2. In the center of the project app page, click the Web icon button to launch the setup workflow.

  3. Enter your app's domain name in the App domain name field.

    • Please note that the domain name value cannot be changed for this Adrop Web app once it has been registered with your Adrop project.

  4. Enter other app information: App nickname.

    • App nickname: An internal, convenience identifier that is only visible to you in the Adrop console

  5. Click Register app and then Android and Apple apps will be created respectively.

Step 3: Add an Adrop configuration file

You can obtain the required App Key from the Authorization header in the code snippet below. Please replace the remaining fields with appropriate values before using it.

You can check the required parameters here.

const axios = require('axios');
        
let config = {
    method: 'get',
    baseURL: 'https://api-rest.adrop.io',
    url: '/request?unit={unit_id}&uid={user_id}&pf={platform}&lcl={locale}',
    headers: {
        'Authorization': 'YOUR_APP_KEY'
    }
};

axios.request(config)
     .then((response) => {
         console.log(JSON.stringify(response.data));
     })
     .catch((error) => {
         console.log(error);
     });

Next Steps

You're all set! Please register an Ad unit to show ads to users.

Learn how to Create your Ad unit.


(Optional) Obtain App Key from configuration file

To integrate Adrop into your project using REST API, it's essential to register your app with your Adrop project and obtain the app_key, which is stored in the adrop_service.json file.

Last updated