Server-side verification (SSV) is another validation for rewarded ad views in your app. It's used in addition to the standard client-side callback.
Server-side verification validates each completed rewarded ad view. This ensures you're only rewarding users who actually finished watching the video in your app. Each time a user finishes viewing a rewarded ad, AdMob uses the callback URL you provide 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 full URL you want AdMob to send to you when a user has finished viewing a rewarded ad (for example, https://example.com/sample_ssv).
- 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.