Integrate Line with mediation (Beta)

This guide shows you how to use the Google Mobile Ads SDK to load and display ads from Line using mediation, covering waterfall integrations. It covers how to add Line to an ad unit's mediation configuration, and how to integrate the Line SDK and adapter into a Unity app.

Supported integrations and ad formats

The AdMob mediation adapter for Line has the following capabilities:

Waterfall  1

1 Waterfall integration is in open beta.


  • Unity 4 or higher
  • Latest Google Mobile Ads SDK
  • To deploy on Android
    • Android API level 21 or higher
  • To deploy on iOS
    • iOS deployment target of 12.0 or higher
  • A working Unity project configured with Google Mobile Ads SDK. See Get Started for details.
  • Complete the mediation Get started guide

Step 1: Set up configurations in Line UI

Log in to your Line account.

Add a new application

Click 広告枠管理 (Ad Slot Management) > メディア (Media). Then, click 新規作成 (Create New).

Fill out the form and click 登録 (Register).

Take note of the Application ID.

Create an ad placement

Click the ID of the application you want to add an ad placement. Then, select 詳細 (Detail).

Click スロット 追加 (Add Slot).

Fill out the form and once done, click (登録) Register.

Take note of the Slot ID.

Step 2: Set up Line demand in AdMob UI

Configure mediation settings for your ad unit


For instructions, see step 2 in the guide for Android.


For instructions, see step 2 in the guide for iOS.

Step 3: Import the Line SDK and adapter

Download the latest version of Google Mobile Ads mediation plugin for Line from the download link in the Changelog and extract GoogleMobileAdsLineMediation.unitypackage from the zip file.

In your Unity project editor, select Assets > Import Package > Custom Package and find the GoogleMobileAdsLineMediation.unitypackage file you downloaded. Make sure that all the files are selected and click Import.

Then, select Assets > Play Services Resolver > Android Resolver > Force Resolve. The Unity Play Services Resolver library will perform dependency resolution from scratch and copy the declared dependencies into the Assets/Plugins/Android directory of your Unity app.

Step 4: Add required code


No additional code is required for Line integration.


SKAdNetwork integration

Follow Line's documentation to add the SKAdNetwork identifiers to your project's Info.plist file.

Step 5: Test your implementation

Enable test ads

Make sure you register your test device for AdMob.

Follow the instructions in Line's Android and iOS documentation on how to enable Line test ads.

Verify test ads

To verify that you are receiving test ads from Line, enable single ad source testing in ad inspector using the Line (Waterfall) ad source(s).

Error codes

If the adapter fails to receive an ad from Line, publishers can check the underlying error from the ad response using ResponseInfo under the following classes:




Here are the codes and accompanying messages thrown by the Line adapter when an ad fails to load:


Error code Domain Reason
1-10 Line SDK returned an SDK-specific error. See Line's documentation for more details.
101 Missing or invalid Application ID.
102 Missing or invalid Slot ID.
103 The requested ad size does not match a Line supported banner ad size.
104 Failed to load an interstitial or rewarded ad due to missing activity context.
105 Line SDK failed to show an interstitial or rewarded ad.
106 Failed to load a native ad due to missing assets.


Error code Domain Reason
1-10 Sent by Line SDK Line SDK returned an SDK-specific error. See Line's documentation for more details.
101 Invalid server parameters (e.g. Missing Application ID or Slot ID).
102 The requested ad size does not match a Line supported banner ad size.
103 Failed to load an information icon image asset in native ad.

Line Unity Mediation Plugin Changelog

Version 1.1.1

Version 1.1.0

Version 1.0.0