Validate rewarded ad views with server-side verification
Server-side verification (SSV) acts as an additional layer of validation for rewarded ad views in your app. It's performed in addition to the standard client-side callback.
You can use server-side verification to validate each completed rewarded ad view to ensure you're only rewarding users who have actually finished watching the video in your app. Each time a user finishes viewing a rewarded ad, AdMob uses the callback URL you provide when you set up an ad unit to validate the view.
Set up and test server-side verification
Complete the following steps:
- Sign in to your AdMob account at https://apps.admob.com.
- Click Apps in the sidebar.
- Select the name of your app. If you don't see it in the list of recent apps, you can click View all apps to search a list of all of the apps you've added to AdMob.
- Click Ad units in the sidebar.
- For new ad units, follow the instructions in Create a rewarded ad unit. For existing ad units, click the name of the ad unit.
- Click Advanced settings.
- Click Set up callback URL beside server-side verification.
- Complete the server-side verification settings:
- Callback URL: The URL you want AdMob to send to you when a user has finished viewing a rewarded ad.
- User ID (optional): This is used for testing only. The user ID is a unique identifier given to each user, which lets you know who to reward upon successful ad completion. To use, set the user_id parameter in the SDK.
- Custom data (optional): This is used for testing only. Custom data is received in the callback after a user’s successful ad completion. For example, you can include a parameter to know which level the user is on. To use, set the custom_data parameter in the SDK.
- Click Verify URL.
You must verify the URL before you can finish setting up SSV.
- Click Use verified URL.