# Table of Contents - [Welcome to PubScale Offerwall SDK | Offerwall SDK](#welcome-to-pubscale-offerwall-sdk-offerwall-sdk) - [Documentations](#documentations) - [Welcome to PubScale Offerwall SDK | 1.0.5 | Offerwall SDK](#welcome-to-pubscale-offerwall-sdk-1-0-5-offerwall-sdk) - [PubScale Onboarding | 1.0.5 | Offerwall SDK](#pubscale-onboarding-1-0-5-offerwall-sdk) - [Setting up the SDK | 1.0.5 | Offerwall SDK](#setting-up-the-sdk-1-0-5-offerwall-sdk) - [Initialize the SDK | 1.0.5 | Offerwall SDK](#initialize-the-sdk-1-0-5-offerwall-sdk) - [Customization | 1.0.5 | Offerwall SDK](#customization-1-0-5-offerwall-sdk) - [Adding the SDK | 1.0.5 | Offerwall SDK](#adding-the-sdk-1-0-5-offerwall-sdk) - [Scene setup | 1.0.5 | Offerwall SDK](#scene-setup-1-0-5-offerwall-sdk) - [Prerequisites | 1.0.5 | Offerwall SDK](#prerequisites-1-0-5-offerwall-sdk) - [Initialize the SDK | 1.0.5 | Offerwall SDK](#initialize-the-sdk-1-0-5-offerwall-sdk) - [Pre integration checks | 1.0.5 | Offerwall SDK](#pre-integration-checks-1-0-5-offerwall-sdk) - [Start the OfferWall | 1.0.5 | Offerwall SDK](#start-the-offerwall-1-0-5-offerwall-sdk) - [Setting up the SDK | 1.0.5 | Offerwall SDK](#setting-up-the-sdk-1-0-5-offerwall-sdk) - [Start the OfferWall | 1.0.5 | Offerwall SDK](#start-the-offerwall-1-0-5-offerwall-sdk) - [Samples | 1.0.5 | Offerwall SDK](#samples-1-0-5-offerwall-sdk) - [S2S Callback Configuration | 1.0.5 | Offerwall SDK](#s2s-callback-configuration-1-0-5-offerwall-sdk) - [Welcome to PubScale Offerwall SDK | 1.0.7 | Offerwall SDK](#welcome-to-pubscale-offerwall-sdk-1-0-7-offerwall-sdk) - [FAQs | Offerwall SDK](#faqs-offerwall-sdk) - [Samples | Offerwall SDK](#samples-offerwall-sdk) - [PubScale Onboarding | 1.0.7 | Offerwall SDK](#pubscale-onboarding-1-0-7-offerwall-sdk) - [Welcome to PubScale Offerwall SDK | 1.0.6-beta1 | Offerwall SDK](#welcome-to-pubscale-offerwall-sdk-1-0-6-beta1-offerwall-sdk) - [PubScale Onboarding | 1.0.6-beta1 | Offerwall SDK](#pubscale-onboarding-1-0-6-beta1-offerwall-sdk) - [Samples | 1.0.7 | Offerwall SDK](#samples-1-0-7-offerwall-sdk) - [Flutter | Offerwall SDK](#flutter-offerwall-sdk) - [Promotions | Offerwall SDK](#promotions-offerwall-sdk) - [Samples | 1.0.6-beta1 | Offerwall SDK](#samples-1-0-6-beta1-offerwall-sdk) - [Initialize the SDK | 1.0.7 | Offerwall SDK](#initialize-the-sdk-1-0-7-offerwall-sdk) - [Setting up the SDK | 1.0.7 | Offerwall SDK](#setting-up-the-sdk-1-0-7-offerwall-sdk) - [Prerequisites | 1.0.6-beta1 | Offerwall SDK](#prerequisites-1-0-6-beta1-offerwall-sdk) - [Start the OfferWall | 1.0.7 | Offerwall SDK](#start-the-offerwall-1-0-7-offerwall-sdk) - [Samples | 1.0.9 | Offerwall SDK](#samples-1-0-9-offerwall-sdk) - [Prerequisites | 1.0.7 | Offerwall SDK](#prerequisites-1-0-7-offerwall-sdk) - [Setting up the SDK | 1.0.7 | Offerwall SDK](#setting-up-the-sdk-1-0-7-offerwall-sdk) - [Direct Link | 1.0.7 | Offerwall SDK](#direct-link-1-0-7-offerwall-sdk) - [Launch the offerwall | 1.0.7 | Offerwall SDK](#launch-the-offerwall-1-0-7-offerwall-sdk) - [Setting up the SDK | 1.0.7 | Offerwall SDK](#setting-up-the-sdk-1-0-7-offerwall-sdk) - [Adding the dependencies | 1.0.7 | Offerwall SDK](#adding-the-dependencies-1-0-7-offerwall-sdk) - [iOS | Offerwall SDK](#ios-offerwall-sdk) - [FAQs | 1.0.9 | Offerwall SDK](#faqs-1-0-9-offerwall-sdk) - [React Native | Offerwall SDK](#react-native-offerwall-sdk) - [Setting up your app | Offerwall SDK](#setting-up-your-app-offerwall-sdk) - [Android Integration | Offerwall SDK](#android-integration-offerwall-sdk) - [Initialize the SDK | 1.0.6-beta1 | Offerwall SDK](#initialize-the-sdk-1-0-6-beta1-offerwall-sdk) - [Preintegration Checks | 1.0.7 | Offerwall SDK](#preintegration-checks-1-0-7-offerwall-sdk) - [Welcome to PubScale Offerwall SDK | 1.0.9 | Offerwall SDK](#welcome-to-pubscale-offerwall-sdk-1-0-9-offerwall-sdk) - [Initialize the SDK | 1.0.7 | Offerwall SDK](#initialize-the-sdk-1-0-7-offerwall-sdk) - [Start the OfferWall | 1.0.6-beta1 | Offerwall SDK](#start-the-offerwall-1-0-6-beta1-offerwall-sdk) - [Unity | Offerwall SDK](#unity-offerwall-sdk) - [Start the OfferWall | 1.0.7 | Offerwall SDK](#start-the-offerwall-1-0-7-offerwall-sdk) - [IFrame integration | 1.0.7 | Offerwall SDK](#iframe-integration-1-0-7-offerwall-sdk) - [FAQs | 1.0.10 | Offerwall SDK](#faqs-1-0-10-offerwall-sdk) - [Samples | 1.0.10 | Offerwall SDK](#samples-1-0-10-offerwall-sdk) - [Web | Offerwall SDK](#web-offerwall-sdk) - [Initialize the SDK | 1.0.6-beta1 | Offerwall SDK](#initialize-the-sdk-1-0-6-beta1-offerwall-sdk) - [S2S Callback Configuration | 1.0.7 | Offerwall SDK](#s2s-callback-configuration-1-0-7-offerwall-sdk) - [Integration | 1.0.7 | Offerwall SDK](#integration-1-0-7-offerwall-sdk) - [Start the OfferWall | 1.0.6-beta1 | Offerwall SDK](#start-the-offerwall-1-0-6-beta1-offerwall-sdk) - [Welcome to PubScale Offerwall SDK | 1.0.10 | Offerwall SDK](#welcome-to-pubscale-offerwall-sdk-1-0-10-offerwall-sdk) - [Sandbox Environment | Offerwall SDK](#sandbox-environment-offerwall-sdk) - [Setting up the SDK | 1.0.6-beta1 | Offerwall SDK](#setting-up-the-sdk-1-0-6-beta1-offerwall-sdk) - [Server-to-Server (S2S) Callback Configuration | Offerwall SDK](#server-to-server-s2s-callback-configuration-offerwall-sdk) - [Server-to-Server (S2S) Callback Configuration | 1.0.9 | Offerwall SDK](#server-to-server-s2s-callback-configuration-1-0-9-offerwall-sdk) - [IP Whitelist | 1.0.7 | Offerwall SDK](#ip-whitelist-1-0-7-offerwall-sdk) - [Setting up the SDK | 1.0.6-beta1 | Offerwall SDK](#setting-up-the-sdk-1-0-6-beta1-offerwall-sdk) - [Sandbox Environment | 1.0.9 | Offerwall SDK](#sandbox-environment-1-0-9-offerwall-sdk) - [Samples | 1.0.6-beta2 | Offerwall SDK](#samples-1-0-6-beta2-offerwall-sdk) - [Welcome to PubScale Offerwall SDK | 1.0.6-beta2 | Offerwall SDK](#welcome-to-pubscale-offerwall-sdk-1-0-6-beta2-offerwall-sdk) - [Sandbox Environment | 1.0.7 | Offerwall SDK](#sandbox-environment-1-0-7-offerwall-sdk) - [Sandbox Environment | 1.0.6-beta1 | Offerwall SDK](#sandbox-environment-1-0-6-beta1-offerwall-sdk) - [Setting up your app | 1.0.9 | Offerwall SDK](#setting-up-your-app-1-0-9-offerwall-sdk) - [PubScale Onboarding | 1.0.6-beta2 | Offerwall SDK](#pubscale-onboarding-1-0-6-beta2-offerwall-sdk) - [API | Offerwall SDK](#api-offerwall-sdk) - [Sandbox Environment | 1.0.10 | Offerwall SDK](#sandbox-environment-1-0-10-offerwall-sdk) - [Initialize the SDK | 1.0.6-beta2 | Offerwall SDK](#initialize-the-sdk-1-0-6-beta2-offerwall-sdk) - [React Native | 1.0.9 | Offerwall SDK](#react-native-1-0-9-offerwall-sdk) - [Setting up the SDK | 1.0.6-beta2 | Offerwall SDK](#setting-up-the-sdk-1-0-6-beta2-offerwall-sdk) - [Server-to-Server (S2S) Callback Configuration | 1.0.10 | Offerwall SDK](#server-to-server-s2s-callback-configuration-1-0-10-offerwall-sdk) - [Web Offerwall | 1.0.9 | Offerwall SDK](#web-offerwall-1-0-9-offerwall-sdk) - [Start the OfferWall | 1.0.6-beta2 | Offerwall SDK](#start-the-offerwall-1-0-6-beta2-offerwall-sdk) - [Prerequisites | 1.0.6-beta2 | Offerwall SDK](#prerequisites-1-0-6-beta2-offerwall-sdk) - [Unity | 1.0.9 | Offerwall SDK](#unity-1-0-9-offerwall-sdk) - [Android Integration | 1.0.9 | Offerwall SDK](#android-integration-1-0-9-offerwall-sdk) - [S2S Callback Configuration | 1.0.6-beta1 | Offerwall SDK](#s2s-callback-configuration-1-0-6-beta1-offerwall-sdk) - [iOS | 1.0.10 | Offerwall SDK](#ios-1-0-10-offerwall-sdk) - [IP Whitelist | 1.0.6-beta2 | Offerwall SDK](#ip-whitelist-1-0-6-beta2-offerwall-sdk) - [Start the OfferWall | 1.0.6-beta2 | Offerwall SDK](#start-the-offerwall-1-0-6-beta2-offerwall-sdk) - [Setting up the SDK | 1.0.6-beta2 | Offerwall SDK](#setting-up-the-sdk-1-0-6-beta2-offerwall-sdk) - [Setting up your app | 1.0.10 | Offerwall SDK](#setting-up-your-app-1-0-10-offerwall-sdk) - [Sandbox Environment | 1.0.6-beta2 | Offerwall SDK](#sandbox-environment-1-0-6-beta2-offerwall-sdk) - [Initialize the SDK | 1.0.6-beta2 | Offerwall SDK](#initialize-the-sdk-1-0-6-beta2-offerwall-sdk) - [React Native | 1.0.10 | Offerwall SDK](#react-native-1-0-10-offerwall-sdk) - [S2S Callback Configuration | 1.0.6-beta2 | Offerwall SDK](#s2s-callback-configuration-1-0-6-beta2-offerwall-sdk) - [Web | 1.0.10 | Offerwall SDK](#web-1-0-10-offerwall-sdk) - [Unity | 1.0.10 | Offerwall SDK](#unity-1-0-10-offerwall-sdk) - [Android Integration | 1.0.10 | Offerwall SDK](#android-integration-1-0-10-offerwall-sdk) - [API | 1.0.10 | Offerwall SDK](#api-1-0-10-offerwall-sdk) - [Welcome to Immersive Ads 2 | Immersive Ads SDK](#welcome-to-immersive-ads-2-immersive-ads-sdk) - [IP Whitelist | Offerwall SDK](#ip-whitelist-offerwall-sdk) - [IP Whitelist | 1.0.9 | Offerwall SDK](#ip-whitelist-1-0-9-offerwall-sdk) - [IP Whitelist | 1.0.10 | Offerwall SDK](#ip-whitelist-1-0-10-offerwall-sdk) - [Demand Source setup | Immersive Ads SDK](#demand-source-setup-immersive-ads-sdk) - [Adding the SDK | Immersive Ads SDK](#adding-the-sdk-immersive-ads-sdk) - [Testing the integration | Immersive Ads SDK](#testing-the-integration-immersive-ads-sdk) - [Release notes | Immersive Ads SDK](#release-notes-immersive-ads-sdk) - [Prerequisites | Immersive Ads SDK](#prerequisites-immersive-ads-sdk) - [Ad Object Structure | Immersive Ads SDK](#ad-object-structure-immersive-ads-sdk) - [Troubleshoot | Immersive Ads SDK](#troubleshoot-immersive-ads-sdk) - [Important Changes | Immersive Ads SDK](#important-changes-immersive-ads-sdk) - [Scene setup | Immersive Ads SDK](#scene-setup-immersive-ads-sdk) - [App Linking | Immersive Ads SDK](#app-linking-immersive-ads-sdk) - [PubScaleManager | Immersive Ads SDK](#pubscalemanager-immersive-ads-sdk) - [Integration Checklist | Immersive Ads SDK](#integration-checklist-immersive-ads-sdk) - [NativeAdHolder | Immersive Ads SDK](#nativeadholder-immersive-ads-sdk) - [Changing Ad Visuals | Immersive Ads SDK](#changing-ad-visuals-immersive-ads-sdk) - [Extra Display Templates | Immersive Ads SDK](#extra-display-templates-immersive-ads-sdk) --- # Welcome to PubScale Offerwall SDK | Offerwall SDK ![Page cover](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fx0ylFv11SuG05Xj0pGLn%2Fblobs%2FCrKHBJP6yFl8FeEvgJLq%2FGitbook%2520Offerwall.png&width=1248&dpr=3&quality=100&sign=9963699f&sv=2) [hashtag](https://pubscale.gitbook.io/offerwall-sdk#overview) Overview --------------------------------------------------------------------------- The PubScale Offerwall SDK is an app monetization tool that allows developers to make incremental revenue by asking the user to complete some task in exchange for in-app currency. [hashtag](https://pubscale.gitbook.io/offerwall-sdk#benefits) Benefits --------------------------------------------------------------------------- 1. Incremental revenue 2. Monetize non-paying users 3. Improves user retention [hashtag](https://pubscale.gitbook.io/offerwall-sdk#features) Features --------------------------------------------------------------------------- 1. **Instant reward offers:** You get offers that give out instant rewards on completion. 2. **Fraud prevention:** Our inbuilt fraud detection and prevention system ensures that all the conversions that happen from the app are legit. 3. **Easy integration:** The SDK provides a straightforward integration process, and can be done within a few hours. [hashtag](https://pubscale.gitbook.io/offerwall-sdk#quick-links) Quick links --------------------------------------------------------------------------------- 1. [PubScale dashboardarrow-up-right](https://dashboard.pubscale.com/) 2. [Sample app and code](https://pubscale.gitbook.io/offerwall-sdk/samples) [hashtag](https://pubscale.gitbook.io/offerwall-sdk#get-started) Get Started --------------------------------------------------------------------------------- We've put together some helpful guides for you to get set up with our SDK quickly and easily. ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk#supported-platforms) Supported Platforms [androidAndroid Integrationchevron-right](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/android-integration) [reactReact Nativechevron-right](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/react-native) [unityUnitychevron-right](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/unity) [browserWebchevron-right](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/web) [appleiOSchevron-right](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/ios) ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk#reward-verification) Reward Verification [🦉Server-to-Server (S2S) Callback Configurationchevron-right](https://pubscale.gitbook.io/offerwall-sdk/server-to-server-s2s-callback-configuration) [NextSetting up your appchevron-right](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/setting-up-your-app) Last updated 2 months ago This site uses cookies to deliver its service and to analyze traffic. By browsing this site, you accept the [privacy policy](https://policies.gitbook.com/privacy/cookies) . close AcceptReject --- # Documentations ![Page cover](https://pubscale.gitbook.io/documentations/~gitbook/image?url=https%3A%2F%2F3519687280-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FjM6p8Zo0SdAlvHSYtvo3%252Fuploads%252F1yy8WICNRy2CbQmsrjsu%252Fbanner%25201.jpg%3Falt%3Dmedia%26token%3D42bea0d4-84a9-43de-a9f1-685f15932b5c&width=1248&dpr=3&quality=100&sign=141a609f&sv=2) ### [hashtag](https://pubscale.gitbook.io/documentations#offerwall) Offerwall: [![Logo](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2F1724524932-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fcollections%252FIzktXkJcpL7jgd8bkeCV%252Ficon%252FHViR3bhPUY0zcUBuB6tM%252Ficon-512x512.png%3Falt%3Dmedia%26token%3D30e824f4-6eeb-46ca-89b2-4a517f10b6e5&width=48&height=48&sign=9015966a&sv=2)Welcome to PubScale Offerwall SDK | Offerwall SDKpubscale.gitbook.iochevron-right](https://pubscale.gitbook.io/offerwall-sdk/) ### [hashtag](https://pubscale.gitbook.io/documentations#immersive-a-ds-sdk-for-unity) Immersive Ads SDK for Unity: [![Logo](https://pubscale.gitbook.io/immersive-ads-sdk/~gitbook/image?url=https%3A%2F%2F2135195775-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fcollections%252F7kAXTVv05lUJ91J4IYeV%252Ficon%252FsguNA0dswQ3oRNvJAcQN%252Ficon-512x512.png%3Falt%3Dmedia%26token%3Da7c26817-117c-46f2-b908-7f89465981ca&width=48&height=48&sign=59ab2364&sv=2)Welcome to Immersive Ads 2 | Immersive Ads SDKpubscale.gitbook.iochevron-right](https://pubscale.gitbook.io/immersive-ads-sdk/) Last updated 2 years ago --- # Welcome to PubScale Offerwall SDK | 1.0.5 | Offerwall SDK ![Page cover](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2FaUVG0uxfukyc5xCdlEhZ%2Fblobs%2FhKE0septTPS1i1HmgTdP%2Fbanner%25201.jpg&width=1248&dpr=3&quality=100&sign=75e9a981&sv=2) [hashtag](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5#overview) Overview ---------------------------------------------------------------------------------- The PubScale Offerwall SDK is an app monetization tool that allows developers to make incremental revenue by asking the user to complete some task in exchange for in-app currency. [hashtag](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5#benefits) Benefits ---------------------------------------------------------------------------------- 1. Incremental revenue 2. Monetize non-paying users 3. Improves user retention [hashtag](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5#features) Features ---------------------------------------------------------------------------------- 1. **Instant reward offers:** You get offers that give out instant rewards on completion. 2. **Fraud prevention:** Our inbuilt fraud detection and prevention system ensures that all the conversions that happen from the app are legit. 3. **Easy integration:** The SDK provides a straightforward integration process, and can be done within a few hours. [hashtag](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5#quick-links) Quick links ---------------------------------------------------------------------------------------- 1. [PubScale dashboardarrow-up-right](https://dashboard.pubscale.com/) 2. [Sample app and code](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/samples) [hashtag](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5#get-started) Get Started ---------------------------------------------------------------------------------------- We've put together some helpful guides for you to get set up with our SDK quickly and easily. [📪Prerequisiteschevron-right](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/prerequisites/prerequisites) [Native Androidchevron-right](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/native-android/setting-up-the-sdk) [Unitychevron-right](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/unity/pre-integration-checks) [React Nativechevron-right](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/react-native/setting-up-the-sdk) [🦉S2S Callback Configurationchevron-right](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/s2s-callback-configuration/s2s-callback-configuration) [NextPrerequisiteschevron-right](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/prerequisites/prerequisites) Last updated 2 years ago * [Overview](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5#overview) * [Benefits](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5#benefits) * [Features](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5#features) * [Quick links](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5#quick-links) * [Get Started](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5#get-started) --- # PubScale Onboarding | 1.0.5 | Offerwall SDK ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/prerequisites/pubscale-onboarding#create-an-account) Create an account Create an account with PubScale through the dashboard at [https://dashboard.pubscale.comarrow-up-right](https://dashboard.pubscale.com/) ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/prerequisites/pubscale-onboarding#request-offerwall-sdk) Request Offerwall SDK The Offerwall SDK is currently released as an invite-only feature on the dashboard. You will have to request your account manager for this feature to be visible in your account after you have signed up on the dashboard. Once you have the feature enabled, you can proceed with creating an app and the integration flow. ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/prerequisites/pubscale-onboarding#creating-an-offerwall-unit) Creating an Offerwall Unit Once the feature is enabled, you can access it from the side navigation list. 1. Click on the **Offerwall** item on the navigation list ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2F3371507213-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FaUVG0uxfukyc5xCdlEhZ%252Fuploads%252FJRKZiDS1kmUf31Npc1GX%252FGroup%252078578.png%3Falt%3Dmedia%26token%3D75aa1fef-914d-469c-88d1-9c343a79d13b&width=768&dpr=3&quality=100&sign=5ea54577&sv=2) 1. Next, create an Offerwall placement for the app by clicking on the **Create Offerwall** button and create the offerwall unit by providing the required details and config. ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2F3371507213-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FaUVG0uxfukyc5xCdlEhZ%252Fuploads%252F1mnqbBerJIMUTJ4nGlQs%252FGroup%252078579.png%3Falt%3Dmedia%26token%3D2490a4e6-18f5-40dc-81bd-51bfbf7e79db&width=768&dpr=3&quality=100&sign=1f4c6e0d&sv=2) 1. Once the Offerwall unit is created, you have to make it Live to start using the Offerwall. ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2F3371507213-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FaUVG0uxfukyc5xCdlEhZ%252Fuploads%252FDYA7VLpYVh07yvNt7R49%252FGroup%252078580.png%3Falt%3Dmedia%26token%3D8b1ba07c-c3df-40b7-8f5b-1f6b4950ae78&width=768&dpr=3&quality=100&sign=f43f874&sv=2) 1. Additionally, you can also setup S2S callbacks for better security. ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2F3371507213-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FaUVG0uxfukyc5xCdlEhZ%252Fuploads%252F9VYLKzFNkSK274ZbDUt4%252FGroup%252078580%2520%281%29.png%3Falt%3Dmedia%26token%3D39d11794-8a12-4237-a22c-630e684604d0&width=768&dpr=3&quality=100&sign=ecdb55af&sv=2) [PreviousPrerequisiteschevron-left](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/prerequisites/prerequisites) [NextSetting up the SDKchevron-right](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/native-android/setting-up-the-sdk) Last updated 2 years ago * [Create an account](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/prerequisites/pubscale-onboarding#create-an-account) * [Request Offerwall SDK](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/prerequisites/pubscale-onboarding#request-offerwall-sdk) * [Creating an Offerwall Unit](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/prerequisites/pubscale-onboarding#creating-an-offerwall-unit) --- # Setting up the SDK | 1.0.5 | Offerwall SDK #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/native-android/setting-up-the-sdk#id-1.-add-this-to-your-settings.gradle-file) 1\. Add this to your settings.gradle file Kotlin Script Groovy Copy dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) repositories { maven { url = uri("https://storage.googleapis.com/caterpillar-libs-bucket/") } } } Copy dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) repositories { maven { url "https://storage.googleapis.com/caterpillar-libs-bucket/" } } } #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/native-android/setting-up-the-sdk#id-2.-add-this-to-your-build.gradle-file) 2\. Add this to your build.gradle file Add the below line inside the **dependencies** block in your build.gradle file Kotlin Script Groovy Copy implementation('com.pubscale.sdkone:offerwall:1.0.5') Copy implementation 'com.pubscale.sdkone:offerwall:1.0.5' #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/native-android/setting-up-the-sdk#id-3.-clean-build-and-rebuild-the-project) 3\. Clean build and Rebuild the project #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/native-android/setting-up-the-sdk#id-4.-configure-proguard-rules) 4\. Configure proguard rules For the SDK to work properly in release(obfuscated/minified) builds, add the following rules in your proguard-rules.pro file. proguard-rules.pro Copy -keep class com.pubscale.sdkone.offerwall.** {*;} #Supporting R8 full mode -keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation -keep,allowobfuscation,allowshrinking interface retrofit2.Call -keep,allowobfuscation,allowshrinking class retrofit2.Response We have added the SDK to the project. Learn how to initialize the SDK in the next step [PreviousPubScale Onboardingchevron-left](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/prerequisites/pubscale-onboarding) [NextInitialize the SDKchevron-right](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/native-android/initialize-the-sdk) Last updated 2 years ago --- # Initialize the SDK | 1.0.5 | Offerwall SDK You must initialize the SDK before using the SDK. To do this, call `Offerwall.init(OfferWallConfig, OfferWallInitListener)` . Parameters for init call: * **OfferWallConfig offerWallConfig:** An object to pass configuration-related info to the SDK while initializing. Refer below for how to create an object of OfferWallConfig. * **OfferWallInitListener offerWallInitListener:** A listener that informs you if the SDK initialization was successful or not. In case of failure, it will also give you a string stating the cause of the failure. This parameter is optional. ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/native-android/initialize-the-sdk#creating-offerwallconfig-object) **Creating OfferWallConfig object:** Create an instance of OfferWallConfig using the builder class OfferWallConfig.Builder by passing the context and your PubScale app ID. Kotlin Java Copy import com.pubscale.sdkone.offerwall.OfferWallConfig .. .. val offerWallConfig = OfferWallConfig.Builder(context, "YOUR_PUBSCALE_APP_ID") .setUniqueId("unique_id") //optional, used to represent the user of your application .setLoaderBackgroundBitmap(backgroundBitmap) //optional .setLoaderForegroundBitmap(foreground) //optional .setFullscreenEnabled(false) //optional .build() Copy import com.pubscale.sdkone.offerwall.OfferWallConfig .. .. OfferWallConfig offerWallConfig = new OfferWallConfig.Builder(context, "YOUR_PUBSCALE_APP_ID") .setUniqueId("unique_id") //optional, used to represent the user of your application .setLoaderBackgroundBitmap(backgroundBitmap)//optional .setLoaderForegroundBitmap(foregroundBitmap)//optional .setFullscreenEnabled(false)//optional .build(); These are the public methods available for OfferWallConfig.Builder class: Public Methods Description setUniqueId(String uniqueId) Sets a unique id that will be used to identify the user uniquely. This will be sent back in the postback. setFullscreenEnabled(Boolean isEnabled) Sets if the offerwall should open in fullscreen mode or not. Default: false setLoaderBackgroundBitmap(Bitmap bitmap) Accepts a bitmap and uses it as the background image for the loader and offerwall top banner. Default: Black color image setLoaderForegroundBitmap(Bitmap bitmap) Accepts a bitmap and uses it as the foreground image for the loader and offerwall top banner. Default: App icon build() Builds the config and returns OfferWallConfig instance triangle-exclamation If a unique ID is not set, rewarding the user is not guaranteed. ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/native-android/initialize-the-sdk#undefined-1) ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/native-android/initialize-the-sdk#initialize-the-offerwall-sdk) **Initialize the Offerwall SDK:** Initialize the OfferWall SDK by calling the init function by passing the offer wall config. Kotlin Java circle-info OfferWallInitListener is an optional parameter in init() method. circle-info If you need to change any config after initializing the SDK, you should destroy and re-init the SDK. To destroy, call `OfferWall.destroy()` [PreviousSetting up the SDKchevron-left](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/native-android/setting-up-the-sdk) [NextStart the OfferWallchevron-right](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/native-android/start-the-offerwall) Last updated 2 years ago * [Creating OfferWallConfig object:](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/native-android/initialize-the-sdk#creating-offerwallconfig-object) * [](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/native-android/initialize-the-sdk#undefined-1) * [Initialize the Offerwall SDK:](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/native-android/initialize-the-sdk#initialize-the-offerwall-sdk) Copy OfferWall.init(offerWallConfig, object : OfferWallInitListener { override fun onInitSuccess() { } override fun onInitFailed(error: InitError) { } }) Copy OfferWall.init(offerWallConfig, new OfferWallInitListener() { @Override public void onInitSuccess() { } @Override public void onInitFailed(@NonNull InitError error) { } }); --- # Customization | 1.0.5 | Offerwall SDK ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/unity/customization#custom-background-for-loader-and-top-banner) Custom background for loader and top banner: #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/unity/customization#step-1-custom-loader-background-and-top-banner-background) Step 1: Custom loader background and top banner background To use a custom background for the loading screen replace the **offer\_bg** file located under Assets/OfferWall/Resources with the image you need. #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/unity/customization#step-2-enable-read-and-write-under-advance-image-settings) Step 2: Enable Read and Write under Advance Image settings Press the preset button on your imported image and select the OfferWallTextureImporter preset from the menu and click apply. ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2F3371507213-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FaUVG0uxfukyc5xCdlEhZ%252Fuploads%252FnGCkFeq6BzU2t0yg1fzz%252Fimage.png%3Falt%3Dmedia%26token%3D96a18212-83ca-463c-86ad-a18ccdcb7264&width=768&dpr=3&quality=100&sign=5a1eddac&sv=2) #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/unity/customization#step-3-adding-custom-background) Step 3: Adding Custom Background Drag and drop the new image file inside the "Offer Wall Background Image" field located on OfferWall prefab. [PreviousScene setupchevron-left](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/unity/scene-setup) [NextSetting up the SDKchevron-right](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/react-native/setting-up-the-sdk) Last updated 2 years ago --- # Adding the SDK | 1.0.5 | Offerwall SDK #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/unity/adding-the-sdk#id-1.-add-the-offerwall-unity-plugin-to-your-unity-project) 1\. Add the OfferWall Unity plugin to your Unity project [Downloadarrow-up-right](https://github.com/GreedyGame/unity-offer_wall_plugin/releases/latest) and import the latest version of OfferWall Unity Plugin from GitHub. #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/unity/adding-the-sdk#id-2.-configuring-publishing-settings) 2\. Configuring Publishing Settings Set the minimum API level to 24 or above and the target API level to 33 or above under Edit/ProjectSettings/Player/Other Settings Check Custom Main Gradle template and Custom Gradle Properties Template under Edit/ProjectSettings/Player/Publishing Settings ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2F3371507213-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FaUVG0uxfukyc5xCdlEhZ%252Fuploads%252F7fd3PoDMy8KiaYAWHDmu%252Fimage.png%3Falt%3Dmedia%26token%3Db86f09f3-4e60-4de1-8259-ae6462fcdc57&width=768&dpr=3&quality=100&sign=40910e43&sv=2) Publishing settings #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/unity/adding-the-sdk#id-3.-force-resolve-dependencies) 3\. Force resolve dependencies **Force resolve** forces the Package Manager to resolve the project’s packages, reinstalling any altered or missing package and removing extraneous packages. To Force resolve the dependencies, Goto Assets > External Dependency Manager > Android Resolver > Force Resolve (if the resolver did not open automatically) ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2F3371507213-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FaUVG0uxfukyc5xCdlEhZ%252Fuploads%252FUzYUObvgE35BpwNoljLm%252Fimage.png%3Falt%3Dmedia%26token%3Dbd15261f-4718-4073-ae62-8839fe558896&width=768&dpr=3&quality=100&sign=4511d285&sv=2) Force resolve dependencies [PreviousPre integration checkschevron-left](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/unity/pre-integration-checks) [NextScene setupchevron-right](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/unity/scene-setup) Last updated 2 years ago --- # Scene setup | 1.0.5 | Offerwall SDK ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/unity/scene-setup#id-1.-configuring-prefabs) 1\. Configuring Prefabs Drag and drop the OfferWall prefab from Assets > OfferWall > Prefabs > OfferWall.prefab in the first scene in your Build Settings. **Drag and Drop OfferWallButton prefab** Drag and drop the OfferWallButton prefab from Assets > OfferWall > Prefabs > OfferWallButton.prefab under any canvas game object. ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/unity/scene-setup#id-2.-configuring-app-key) 2\. Configuring App Key Enter your PubScale app ID inside the "App Key" field located on OfferWall prefab. ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2F3371507213-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FaUVG0uxfukyc5xCdlEhZ%252Fuploads%252FjHk3b7lTMWYyUznAAgqs%252Fimage.png%3Falt%3Dmedia%26token%3Dc9c547cf-3c4a-472a-bbeb-5e99100b81c9&width=768&dpr=3&quality=100&sign=85d4d396&sv=2) OfferWall prefab circle-info The PubScale app ID is an 8-digit identifier generated during the app creation process within the dashboard. ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/unity/scene-setup#id-3.-test-the-offerwall) 3\. Test the OfferWall Finally, To test the offer wall, build the application with the OfferWallDemo scene to an actual device. Check if you can see the “Open OfferWall” button. circle-exclamation Please make sure you have the Android build grade version 4 and above. [PreviousAdding the SDKchevron-left](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/unity/adding-the-sdk) [NextCustomizationchevron-right](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/unity/customization) Last updated 2 years ago * [1\. Configuring Prefabs](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/unity/scene-setup#id-1.-configuring-prefabs) * [2\. Configuring App Key](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/unity/scene-setup#id-2.-configuring-app-key) * [3\. Test the OfferWall](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/unity/scene-setup#id-3.-test-the-offerwall) --- # Prerequisites | 1.0.5 | Offerwall SDK ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/prerequisites/prerequisites#before-starting-the-integration-make-a-quick-check-of-the-things-listed-below) Before starting the integration, make a quick check of the things listed below: 1. You have a [PubScale App ID](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/prerequisites/pubscale-onboarding) and you have created an offerwall placement 2. Ensure your application builds without any errors BEFORE adding the SDK [PreviousWelcome to PubScale Offerwall SDKchevron-left](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5) [NextPubScale Onboardingchevron-right](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/prerequisites/pubscale-onboarding) Last updated 2 years ago --- # Initialize the SDK | 1.0.5 | Offerwall SDK To initialize the SDK, call the PubscaleOfferwall.init() method. Pass the app API key (generated from the console) as the first parameter of the init method. Make sure to call the init method as soon as your app starts up, ideally in app.js or index.js. #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/react-native/initialize-the-sdk#optional-parameters) Optional Parameters: **user\_id:** Pass your user's id in this field to tag your user. This id will be sent along with the S2S callback. Make sure to call the init function every time the user id changes. **background\_Base64:** An image that will be displayed as a banner on top of the offer wall. Pass the image in base64 encoded format. The background will be black by default. **appicon\_Base64:** An image that will be displayed in the center on the top banner of the offerwall. Pass the image in base64 encoded format. Default value is the app icon. ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/react-native/initialize-the-sdk#initializing-the-sdk) Initializing the SDK Copy import {NativeModules, Alert} from 'react-native'; const {PubscaleOfferwall} = NativeModules; //initialises the SDK. //call init once the user is logged in. PubscaleOfferwall.init( "APP_ID", { "user_id": "test-user", //optional, but require to tag user to offer completion. "background_Base64": base64Image, "appicon_Base64": app64Image, //optional }, () => { //onSuccess Callback console.log("success") }, (errMsg)=>{ //onFailure Callbacks console.log(errMsg) }) The SDK Initialization is complete. Learn how to launch the offerwall in the next step. [PreviousSetting up the SDKchevron-left](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/react-native/setting-up-the-sdk) [NextStart the OfferWallchevron-right](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/react-native/start-the-offerwall) Last updated 2 years ago --- # Pre integration checks | 1.0.5 | Offerwall SDK 1\. Make sure you are using Unity version 2019.4.0f1 or above 2\. Android platform is selected for your Unity project. 3\. Use the App ID from the dashboard to initialize the SDK. 4\. Text Mesh Pro package installed in your Unity project. 5\. The Editor must support Android Gradle version 4.0.1 or above. 6\. Ensure your application builds without any errors before adding the plugin. [PreviousStart the OfferWallchevron-left](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/native-android/start-the-offerwall) [NextAdding the SDKchevron-right](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/unity/adding-the-sdk) Last updated 2 years ago --- # Start the OfferWall | 1.0.5 | Offerwall SDK To start the offerwall, just call, `OfferWall.launch(Context, OfferWallListener);` A listener can be set to listen for events fired by the Offer Wall. Kotlin Java Copy import com.pubscale.sdkone.offerwall.OfferWall import com.pubscale.sdkone.offerwall.models.OfferWallListener import com.pubscale.sdkone.offerwall.models.Reward .. .. .. val offerWallListener = object : OfferWallListener{ override fun onOfferWallShowed() { Log.d(TAG, "Offer wall showed.") } override fun onOfferWallClosed() { Log.d(TAG, "Offer wall closed.") } override fun onRewardClaimed(reward: Reward) { Log.d(TAG, "Offer wall reward claimed.") } override fun onFailed(message: String) { Log.d(TAG, "onFailed: $message") } } circle-info onRewardClaimed callback gives you the reward amount and currency details. To start the OfferWall, call the launch method of the OfferWall class. Kotlin Java [PreviousInitialize the SDKchevron-left](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/native-android/initialize-the-sdk) [NextPre integration checkschevron-right](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/unity/pre-integration-checks) Last updated 2 years ago Copy import com.pubscale.sdkone.offerwall.OfferWall import com.pubscale.sdkone.offerwall.models.OfferWallListener import com.pubscale.sdkone.offerwall.models.Reward .. .. OfferWallListener offerWallListener = new OfferWallListener() { @Override public void onOfferWallShowed() { Log.d(TAG, "Offer wall showed."); } @Override public void onOfferWallClosed() { Log.d(TAG, "Offer wall closed."); } @Override public void onRewardClaimed(@NonNull Reward reward) { Log.d(TAG, "Offer wall reward claimed."); } @Override public void onFailed(@NonNull String message) { Log.d(TAG, "onFailed: " + message); } }; Copy import com.pubscale.sdkone.offerwall.OfferWall import com.pubscale.sdkone.offerwall.models.OfferWallListener .. .. OfferWall.launch(context, offerWallListener) Copy import com.pubscale.sdkone.offerwall.OfferWall import com.pubscale.sdkone.offerwall.models.OfferWallListener .. .. OfferWall.launch(context, offerWallListener); --- # Setting up the SDK | 1.0.5 | Offerwall SDK #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/react-native/setting-up-the-sdk#id-1.-add-this-to-your-settings.gradle-file) 1\. Add this to your settings.gradle file Kotlin Script Groovy Copy dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) repositories { maven { url = uri("https://storage.googleapis.com/caterpillar-libs-bucket/") } } } Copy dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) repositories { maven { url "https://storage.googleapis.com/caterpillar-libs-bucket/" } } } #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/react-native/setting-up-the-sdk#id-2.-add-this-to-your-build.gradle-file) 2\. Add this to your build.gradle file Add the below line inside the **dependencies** block in your build.gradle file Kotlin Script Groovy Copy implementation('com.pubscale.sdkone:offerwall:1.0.5') Copy implementation 'com.pubscale.sdkone:offerwall:1.0.5' #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/react-native/setting-up-the-sdk#id-3.-clean-build-and-rebuild-the-project) 3\. Clean build and Rebuild the project #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/react-native/setting-up-the-sdk#id-4.-configure-proguard-rules) 4\. Configure proguard rules For the SDK to work properly in release(obfuscated/minified) builds, add the following rules in your proguard-rules.pro file. proguard-rules.pro Copy -keep class com.pubscale.sdkone.offerwall.** {*;} #Supporting R8 full mode -keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation -keep,allowobfuscation,allowshrinking interface retrofit2.Call -keep,allowobfuscation,allowshrinking class retrofit2.Response We have added the SDK to the project. Learn how to initialize the SDK in the next step #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/react-native/setting-up-the-sdk#id-5.-add-native-module-files) 5\. Add native module files Add the following files to your android app's module directory. * [PubscaleOfferwallSdkModule.javaarrow-up-right](https://storage.googleapis.com/pubscale-offerwall/lib/PubscaleOfferwallSdkModule.java) * [PubscaleOfferwallSdkPackage.java](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5) #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/react-native/setting-up-the-sdk#id-6.-link-the-module) 6\. Link the module Add the following line inside the getPackages() method of MainApplication class. `packages.add(new PubscaleOfferwallSdkPackage());` ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2F3371507213-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FaUVG0uxfukyc5xCdlEhZ%252Fuploads%252FhAoOorjF5xpSyNG1TNBI%252Fimage.png%3Falt%3Dmedia%26token%3D1ce48a96-eb20-41f5-94bc-0071af1b05e9&width=768&dpr=3&quality=100&sign=20eae&sv=2) Adding PubscaleOfferwallSdkPackage to React packages We have setup the SDK in the project. Learn how to initialize the SDK in the next step [PreviousCustomizationchevron-left](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/unity/customization) [NextInitialize the SDKchevron-right](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/react-native/initialize-the-sdk) Last updated 2 years ago --- # Start the OfferWall | 1.0.5 | Offerwall SDK To start the offerwall, just call, `PubscaleOfferwall.launch()` method. Copy PubscaleOfferwall.launch(() => { console.log("close"); //onClose }, (errMsg) => { console.log(errMsg); //onFailure }); [PreviousInitialize the SDKchevron-left](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/react-native/initialize-the-sdk) [NextS2S Callback Configurationchevron-right](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/s2s-callback-configuration/s2s-callback-configuration) Last updated 2 years ago --- # Samples | 1.0.5 | Offerwall SDK 1. [Sample integration - GitRepo - Kotlinarrow-up-right](https://github.com/GreedyGame/sdkone-android-samples/tree/main/kotlin/OfferWallExample) 2. [Sample integration - GitRepo - Javaarrow-up-right](https://github.com/GreedyGame/sdkone-android-samples/tree/main/java/OfferWallExample) 3. [Sample apparrow-up-right](https://pro.chillar.co.in/download) [PreviousS2S Callback Configurationchevron-left](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/s2s-callback-configuration/s2s-callback-configuration) Last updated 2 years ago --- # S2S Callback Configuration | 1.0.5 | Offerwall SDK You can configure the S2S callback for the offerwall in the dashboard inside the Offerwall's overview section. ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/s2s-callback-configuration/s2s-callback-configuration#id-1.-setup-callback-url) 1\. Setup Callback URL When a user has earned a reward by completing an offer, we fire an HTTP GET request to the provided callback URL. The following query parameters will be part of the request. Copy ?user_id=&value=&token=&signature= //Example http://www.example.com/payments/offers/pubscale?user_id=&value=&token=&signature= Query Params Description user\_id The 'unique\_id' set while initializing the SDK. value The decimal value of the reward (in-app currency) earned by the user. token A token that uniquely represents the transaction. signature Hash of the above values to verify the request (more info below). ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/s2s-callback-configuration/s2s-callback-configuration#id-2.-server-response) 2\. Server Response Responding to the callback URL with status codes between and including the values 200 to 299 will mark the callback as successfully delivered. In the event of the server not responding with any of the aforementioned status codes, the request will be **retried 6 times** at different intervals. You can utilize the unique token sent in the request to avoid rewarding the user multiple times for the same callback. ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/s2s-callback-configuration/s2s-callback-configuration#id-3.-optional-parameters-for-fraud-detection-prevention) 3\. Optional Parameters for fraud detection/prevention The value sent in the signature parameter can be used to validate the identity of the origin of the request. The value is an MD5 hash of the template below. The secret key is an additional key that will be provided along with the APP API KEY. Golang NodeJs Python PHP #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/s2s-callback-configuration/s2s-callback-configuration#example) Example secret\_key = `fa072672-d432-11c4-885a-EB1CdEc4Bb13` user\_id = `30356439-8d15-4f47-B133-010a37C19eBD` value = `100.1234` token = `525a5B8e-512b-441A-a10B-72d218c370e5` Final format = `fa072672-d432-11c4-885a-EB1CdEc4Bb13.30356439-8d15-4f47-B133-010a37C19eBD.100.525a5B8e-512b-441A-a10B-72d218c370e5` #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/s2s-callback-configuration/s2s-callback-configuration#steps-to-validate-the-value-of-the-hash) Steps to validate the value of the hash 1. Concatenate the values in the above format. 2. Make sure to convert the value parameter from decimal to integer. 3. Calculate the MD5 hash of the concatenated value. 4. Build Hex encode of the generated value. 5. Verify if the calculated value is equal to the value sent in the signature parameter. circle-info As the value of the secret key will only be known to you and PubScale’s server, the hash cannot be generated by a fraudulent third party. [PreviousStart the OfferWallchevron-left](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/react-native/start-the-offerwall) [NextSampleschevron-right](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/samples) Last updated 2 years ago * [1\. Setup Callback URL](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/s2s-callback-configuration/s2s-callback-configuration#id-1.-setup-callback-url) * [2\. Server Response](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/s2s-callback-configuration/s2s-callback-configuration#id-2.-server-response) * [3\. Optional Parameters for fraud detection/prevention](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/s2s-callback-configuration/s2s-callback-configuration#id-3.-optional-parameters-for-fraud-detection-prevention) Copy template := fmt.Sprintf("%s.%s.%d.%s", , , ), ) hash := toMD5(template) if hash != {signature} { return errors.New("invalid signature") } func toMD5(text string) string { algorithm := md5.New() algorithm.Write([]byte(text)) return hex.EncodeToString(algorithm.Sum(nil)) } Copy const md5 = require('md5') const template = `${}.${}.${Math.trunc()}.${}` const hash = md5(template) if(signature != hash) { return false } Copy import hashlib template = '{secret_key}.{user_id}.{value}.{token}'.format(secret_key=,user_id=,value=int(),token=) hash = hashlib.md5(template.encode('utf-8')).hexdigest() if hash != : return false Copy function calculateHash() { $user = $_GET['user_id']; $token = $_GET['token']; $value = $_GET['value']; $template = . "." . $user . "." . (int)$value . "." $token; return calculateMD5($template); } function calculateMD5($data) { return hash('md5', $data); } $hash = $_GET['signature']; if ($hash != calculateHash()) { return false } --- # Welcome to PubScale Offerwall SDK | 1.0.7 | Offerwall SDK ![Page cover](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fhi3J82Irfk38cjMHFvTF%2Fblobs%2FNEZcqIt91K5sUcc4F4p5%2Fbanner%25201.jpg&width=1248&dpr=3&quality=100&sign=89fb849c&sv=2) [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.7#overview) Overview --------------------------------------------------------------------------------- The PubScale Offerwall SDK is an app monetization tool that allows developers to make incremental revenue by asking the user to complete some task in exchange for in-app currency. [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.7#benefits) Benefits --------------------------------------------------------------------------------- 1. Incremental revenue 2. Monetize non-paying users 3. Improves user retention [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.7#features) Features --------------------------------------------------------------------------------- 1. **Instant reward offers:** You get offers that give out instant rewards on completion. 2. **Fraud prevention:** Our inbuilt fraud detection and prevention system ensures that all the conversions that happen from the app are legit. 3. **Easy integration:** The SDK provides a straightforward integration process, and can be done within a few hours. [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.7#quick-links) Quick links --------------------------------------------------------------------------------------- 1. [PubScale dashboardarrow-up-right](https://dashboard.pubscale.com/) 2. [Sample app and code](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/samples) [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.7#get-started) Get Started --------------------------------------------------------------------------------------- We've put together some helpful guides for you to get set up with our SDK quickly and easily. [📪Prerequisiteschevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/prerequisites/prerequisites) [Native Androidchevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/native-android/setting-up-the-sdk) [React Nativechevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/react-native/setting-up-the-sdk) [🦉S2S Callback Configurationchevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/s2s-callback-configuration/s2s-callback-configuration) [NextPrerequisiteschevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/prerequisites/prerequisites) Last updated 1 year ago * [Overview](https://pubscale.gitbook.io/offerwall-sdk/1.0.7#overview) * [Benefits](https://pubscale.gitbook.io/offerwall-sdk/1.0.7#benefits) * [Features](https://pubscale.gitbook.io/offerwall-sdk/1.0.7#features) * [Quick links](https://pubscale.gitbook.io/offerwall-sdk/1.0.7#quick-links) * [Get Started](https://pubscale.gitbook.io/offerwall-sdk/1.0.7#get-started) --- # FAQs | Offerwall SDK chevron-rightHow do I create an PubScale Offerwall Placement/How do I get Offerwall App ID?[hashtag](https://pubscale.gitbook.io/offerwall-sdk/faqs#how-do-i-create-an-pubscale-offerwall-placement-how-do-i-get-offerwall-app-id) Refer to the content below. [Setting up your app](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/setting-up-your-app) chevron-rightHow do I show my currency icon on the PubScale Offerwall?[hashtag](https://pubscale.gitbook.io/offerwall-sdk/faqs#how-do-i-show-my-currency-icon-on-the-pubscale-offerwall) While setting up the offerwall, you can add an icon for your currency. This icon can also be uploaded later on the app details page after creating the offerwall. chevron-rightHow do I test the Offerwall Integration?[hashtag](https://pubscale.gitbook.io/offerwall-sdk/faqs#how-do-i-test-the-offerwall-integration) To test the integration, you can make use of the [sandbox environment](https://pubscale.gitbook.io/offerwall-sdk/sandbox-environment/sandbox-environment) . Sandbox environment will have test offers which are very easy to complete. Upon completion of these offers you will receive S2S postbacks on the configured Sandbox S2S URL. chevron-rightHow to reach to the PubScale team?[hashtag](https://pubscale.gitbook.io/offerwall-sdk/faqs#how-to-reach-to-the-pubscale-team) Email us at [info@pubscale.comenvelope](mailto:info@pubscale.com) chevron-rightHow to get approval for web integration?[hashtag](https://pubscale.gitbook.io/offerwall-sdk/faqs#how-to-get-approval-for-web-integration) Contact to your Account Manager or email us at [info@pubscale.comenvelope](mailto:info@pubscale.com) [PreviousSampleschevron-left](https://pubscale.gitbook.io/offerwall-sdk/samples) sun-brightdesktopmoon sun-brightdesktopmoon --- # Samples | Offerwall SDK 1. [Sample integration - GitRepo - Kotlinarrow-up-right](https://github.com/GreedyGame/demo-offerwall-android) 2. [Sample apparrow-up-right](https://play.google.com/store/apps/details?id=app.quick.money.earn.joy) [PreviousSandbox Environmentchevron-left](https://pubscale.gitbook.io/offerwall-sdk/sandbox-environment/sandbox-environment) [NextFAQschevron-right](https://pubscale.gitbook.io/offerwall-sdk/faqs) sun-brightdesktopmoon sun-brightdesktopmoon --- # PubScale Onboarding | 1.0.7 | Offerwall SDK ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/prerequisites/pubscale-onboarding#create-an-account) Create an account Create an account with PubScale through the dashboard at [https://dashboard.pubscale.comarrow-up-right](https://dashboard.pubscale.com/) ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/prerequisites/pubscale-onboarding#request-offerwall-sdk) Request Offerwall SDK The Offerwall SDK is currently released as an invite-only feature on the dashboard. You will have to request your account manager for this feature to be visible in your account after you have signed up on the dashboard. Once you have the feature enabled, you can proceed with creating an app and the integration flow. ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/prerequisites/pubscale-onboarding#creating-an-offerwall-unit) Creating an Offerwall Unit Once the feature is enabled, you can access it from the side navigation list. 1. Click on the **Offerwall** item on the navigation list ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fhi3J82Irfk38cjMHFvTF%2Fblobs%2FAf87bVBcwfm91ayPxkmC%2FGroup%252078578.png&width=768&dpr=3&quality=100&sign=7033533c&sv=2) 1. Next, create an Offerwall placement for the app by clicking on the **Create Offerwall** button and create the offerwall unit by providing the required details and config. ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fhi3J82Irfk38cjMHFvTF%2Fblobs%2FTm3NjNk68xHulfnhovVu%2FGroup%252078579.png&width=768&dpr=3&quality=100&sign=43ba75a1&sv=2) 1. Once the Offerwall unit is created, you have to make it Live to start using the Offerwall. ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fhi3J82Irfk38cjMHFvTF%2Fblobs%2F3FmadD4fhapjKLcvwG1H%2FGroup%252078580.png&width=768&dpr=3&quality=100&sign=89e39252&sv=2) 1. Additionally, you can also setup S2S callbacks for better security. ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fhi3J82Irfk38cjMHFvTF%2Fblobs%2FIT2oXIfOaXZlkY7QEWbz%2FGroup%252078580%2520%281%29.png&width=768&dpr=3&quality=100&sign=276aaa09&sv=2) [PreviousPrerequisiteschevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/prerequisites/prerequisites) [NextSetting up the SDKchevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/native-android/setting-up-the-sdk) Last updated 1 year ago * [Create an account](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/prerequisites/pubscale-onboarding#create-an-account) * [Request Offerwall SDK](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/prerequisites/pubscale-onboarding#request-offerwall-sdk) * [Creating an Offerwall Unit](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/prerequisites/pubscale-onboarding#creating-an-offerwall-unit) --- # Welcome to PubScale Offerwall SDK | 1.0.6-beta1 | Offerwall SDK ![Page cover](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2FcJjYVtSXK83YJkG3H9nv%2Fblobs%2FUbivQhqP2zLnd4mbqOcS%2Fbanner%25201.jpg&width=1248&dpr=3&quality=100&sign=fd41d9e9&sv=2) [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1#overview) Overview --------------------------------------------------------------------------------------- The PubScale Offerwall SDK is an app monetization tool that allows developers to make incremental revenue by asking the user to complete some task in exchange for in-app currency. [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1#benefits) Benefits --------------------------------------------------------------------------------------- 1. Incremental revenue 2. Monetize non-paying users 3. Improves user retention [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1#features) Features --------------------------------------------------------------------------------------- 1. **Instant reward offers:** You get offers that give out instant rewards on completion. 2. **Fraud prevention:** Our inbuilt fraud detection and prevention system ensures that all the conversions that happen from the app are legit. 3. **Easy integration:** The SDK provides a straightforward integration process, and can be done within a few hours. [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1#quick-links) Quick links --------------------------------------------------------------------------------------------- 1. [PubScale dashboardarrow-up-right](https://dashboard.pubscale.com/) 2. [Sample app and code](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1/samples) [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1#get-started) Get Started --------------------------------------------------------------------------------------------- We've put together some helpful guides for you to get set up with our SDK quickly and easily. [📪Prerequisiteschevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1/prerequisites/prerequisites) [Native Androidchevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1/native-android/setting-up-the-sdk) [React Nativechevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1/react-native/setting-up-the-sdk) [🦉S2S Callback Configurationchevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1/s2s-callback-configuration/s2s-callback-configuration) [NextPrerequisiteschevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1/prerequisites/prerequisites) Last updated 2 years ago * [Overview](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1#overview) * [Benefits](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1#benefits) * [Features](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1#features) * [Quick links](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1#quick-links) * [Get Started](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1#get-started) --- # PubScale Onboarding | 1.0.6-beta1 | Offerwall SDK ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1/prerequisites/pubscale-onboarding#create-an-account) Create an account Create an account with PubScale through the dashboard at [https://dashboard.pubscale.comarrow-up-right](https://dashboard.pubscale.com/) ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1/prerequisites/pubscale-onboarding#request-offerwall-sdk) Request Offerwall SDK The Offerwall SDK is currently released as an invite-only feature on the dashboard. You will have to request your account manager for this feature to be visible in your account after you have signed up on the dashboard. Once you have the feature enabled, you can proceed with creating an app and the integration flow. ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1/prerequisites/pubscale-onboarding#creating-an-offerwall-unit) Creating an Offerwall Unit Once the feature is enabled, you can access it from the side navigation list. 1. Click on the **Offerwall** item on the navigation list ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2FcJjYVtSXK83YJkG3H9nv%2Fblobs%2FDRLg1dxyz9dJ5WGcGyHz%2FGroup%252078578.png&width=768&dpr=3&quality=100&sign=98f38367&sv=2) 1. Next, create an Offerwall placement for the app by clicking on the **Create Offerwall** button and create the offerwall unit by providing the required details and config. ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2FcJjYVtSXK83YJkG3H9nv%2Fblobs%2FbliloCVCkrIVts2GMwCZ%2FGroup%252078579.png&width=768&dpr=3&quality=100&sign=d383a6c1&sv=2) 1. Once the Offerwall unit is created, you have to make it Live to start using the Offerwall. ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2FcJjYVtSXK83YJkG3H9nv%2Fblobs%2F69joWvJGPSV2KVXjF7VF%2FGroup%252078580.png&width=768&dpr=3&quality=100&sign=36d6fc0f&sv=2) 1. Additionally, you can also setup S2S callbacks for better security. ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2FcJjYVtSXK83YJkG3H9nv%2Fblobs%2Fryrqc5cEmK0fM0VVtgk2%2FGroup%252078580%2520%281%29.png&width=768&dpr=3&quality=100&sign=3aea36fe&sv=2) [PreviousPrerequisiteschevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1/prerequisites/prerequisites) [NextSetting up the SDKchevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1/native-android/setting-up-the-sdk) * [Create an account](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1/prerequisites/pubscale-onboarding#create-an-account) * [Request Offerwall SDK](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1/prerequisites/pubscale-onboarding#request-offerwall-sdk) * [Creating an Offerwall Unit](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1/prerequisites/pubscale-onboarding#creating-an-offerwall-unit) --- # Samples | 1.0.7 | Offerwall SDK 1. [Sample integration - GitRepo - Kotlinarrow-up-right](https://github.com/GreedyGame/sdkone-android-samples/tree/main/kotlin/OfferWallExample) 2. [Sample integration - GitRepo - Javaarrow-up-right](https://github.com/GreedyGame/sdkone-android-samples/tree/main/java/OfferWallExample) 3. [Sample apparrow-up-right](https://pro.chillar.co.in/download) [PreviousSandbox Environmentchevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/sandbox-environment/sandbox-environment) --- # Flutter | Offerwall SDK circle-exclamation **Before you start** To set up the PubScale Offerwall, you’ll need to add your app to our platform. Follow this guide for instructions on [how to set up your app](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/setting-up-your-app) . Once completed, you will receive a unique 8-digit app ID. **Note: Please use seperate app IDs for Android and iOS** circle-info You can view the example integration from [pub.devarrow-up-right](https://pub.dev/packages/pubscale_offerwall_plugin/example) [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/flutter#id-1.-add-this-to-your-pubspec.yaml-file) 1\. Add this to your pubspec.yaml file ------------------------------------------------------------------------------------------------------------------------------------------------------------------- Add the below line inside the **dependencies** block in your pubspec.yaml file Copy dependencies: pubscale_offerwall_plugin: ^0.0.4 [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/flutter#id-2.-rebuild-the-project) 2\. Rebuild the project ------------------------------------------------------------------------------------------------------------------------------------- [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/flutter#id-3.-initialize-the-offerwall) 3\. Initialize the Offerwall ----------------------------------------------------------------------------------------------------------------------------------------------- Add the below code into the widget where you want to initialize the offerwall Copy import 'package:pubscale_offerwall_plugin/pubscale_offerwall_plugin.dart'; .. .. .. final _pubscaleOfferwallPlugin = PubscaleOfferwallPlugin(); _pubscaleOfferwallPlugin.initializeOfferwall( 'YOUR_APP_KEY', //PubScale app key 'UNIQUE_ID', // Unique ID to identify your user false, //sandbox false, //fullscreen ); [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/flutter#id-4.-launch-the-offerwall) 4\. Launch the Offerwall --------------------------------------------------------------------------------------------------------------------------------------- Add the below code into the widget where you want to launch the offerwall [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/flutter#id-5.-listen-to-offerwall-events) 5\. Listen to Offerwall events --------------------------------------------------------------------------------------------------------------------------------------------------- You can handle various states of the offerwall by listening to the events by adding the below code [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/flutter#id-3.-test-the-offerwall) 6\. Setup S2S callbacks ------------------------------------------------------------------------------------------------------------------------------------ Setup the S2S callbacks to get instant updates whenever the user gets the reward. You can use this callback to reward the user in your application. [Learn more.](https://pubscale.gitbook.io/offerwall-sdk/server-to-server-s2s-callback-configuration) [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/flutter#id-3.-test-the-offerwall-1) 7\. Test the OfferWall ------------------------------------------------------------------------------------------------------------------------------------- circle-info Please use the sandbox environment for testing purposes to get instant callbacks and rewards. To learn how to enable the Sandbox environment, [click here](https://pubscale.gitbook.io/offerwall-sdk/sandbox-environment/sandbox-environment) . Finally, to test the offerwall, build the application to an actual device. Check if you can launch the Offerwall and get the appropriate callbacks. [PreviousReact Nativechevron-left](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/react-native) [NextUnitychevron-right](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/unity) Last updated 6 months ago * [1\. Add this to your pubspec.yaml file](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/flutter#id-1.-add-this-to-your-pubspec.yaml-file) * [2\. Rebuild the project](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/flutter#id-2.-rebuild-the-project) * [3\. Initialize the Offerwall](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/flutter#id-3.-initialize-the-offerwall) * [4\. Launch the Offerwall](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/flutter#id-4.-launch-the-offerwall) * [5\. Listen to Offerwall events](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/flutter#id-5.-listen-to-offerwall-events) * [6\. Setup S2S callbacks](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/flutter#id-3.-test-the-offerwall) * [7\. Test the OfferWall](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/flutter#id-3.-test-the-offerwall-1) sun-brightdesktopmoon Copy import 'package:pubscale_offerwall_plugin/pubscale_offerwall_plugin.dart'; .. .. .. final _pubscaleOfferwallPlugin = PubscaleOfferwallPlugin(); _pubscaleOfferwallPlugin.launchOfferwall() Copy import 'package:pubscale_offerwall_plugin/pubscale_offerwall_plugin.dart'; .. .. .. _pubscaleOfferwallPlugin.offerwallEvents.listen((event) { switch (event['event']) { case 'offerwall_init_success': print('offerwall_init_success'); break; case 'offerwall_init_failed': print('offerwall_init_failed'); break; case 'offerwall_showed': print('offerwall_showed'); break; case 'offerwall_closed': print('offerwall_closed'); break; case 'offerwall_reward': print('offerwall_reward: ${event['amount']} ${event['currency']}'); break; case 'offerwall_launch_failed': print('offerwall_launch_failed. \nError: ${event['error']}') break; } }); sun-brightdesktopmoon --- # Promotions | Offerwall SDK The **Promotions** feature empowers publishers to boost user engagement by offering bonus rewards for completing offers in your app. For example, if an offer typically rewards 100 coins, you can run a promotion to give users 120 coins (or any custom bonus) for a limited time. Promotions are fully configurable in your PubScale Dashboard under the **Offerwall** section. [hashtag](https://pubscale.gitbook.io/offerwall-sdk/promotions#id-1.-creating-a-promotion) 1\. Creating a Promotion ------------------------------------------------------------------------------------------------------------------------ Go to the Offerwall section, open the Overview tab, select your app from the list, then click the Promotion card in your app’s dashboard to view or create promotions. Click **Create Promotion** to get started. ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2F95496035-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fx0ylFv11SuG05Xj0pGLn%252Fuploads%252FkRDh67DyShELsB5sb70G%252FScreenshot%25202025-06-20%2520at%25202.59.31%25E2%2580%25AFPM.png%3Falt%3Dmedia%26token%3Dd202c1ed-5a10-4385-b899-edc2a6d0a85f&width=768&dpr=3&quality=100&sign=f66a3c10&sv=2) circle-info Only one promotion can be active at a time. ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/promotions#id-1.1.-promotion-details) 1.1. Promotion Details Promotion Name Internal name for your reference (not shown to users) Promotion Display Name Name shown to users on the offerwall (e.g., New Year Offer) Increase Percentage Enter the percentage by which you want to increase the default offer reward for users (e.g., 20 for +20% bonus, so a 100 coin reward becomes 120 coins). Date Range **Set when the promotion should be active** (Start/End date & time, local timezone is auto-applied). **Note:** The promotion duration must be between 1 and 7 days (minimum 1 day, maximum 7 days). Targeting Optionally select target countries to include or exclude Promotion Banner (Optional) Upload a banner image to visually highlight your promotion (JPG/PNG, max 1MB) circle-info A live preview will appear in the right pane, instantly reflecting any changes you make. ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2F95496035-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fx0ylFv11SuG05Xj0pGLn%252Fuploads%252FYQNqS9GBqNh2Vf8Hfwzl%252FScreenshot%25202025-06-19%2520at%252012.52.56%25E2%2580%25AFPM.png%3Falt%3Dmedia%26token%3Daf931623-84a3-4ae7-8ae2-285184ea0bec&width=768&dpr=3&quality=100&sign=8a414ad6&sv=2) circle-info This promotional bonus is provided by you (the publisher) to drive user engagement. The cost of the extra reward will be deducted from your margin, not the advertiser’s. ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/promotions#id-2.-how-promotions-work) 2\. How Promotions Work * **User View:** Users see the promotion and the increased reward directly in the offerwall, along with your custom banner (if provided). * **Reward Calculation:** The user receives the base reward _plus_ the promotional bonus. _Example:_ If the base reward is 100 coins and the promotion is +20%, the user gets 120 coins. ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/promotions#id-3.-promotion-scheduling) 3\. Promotion Scheduling * **Start Immediately:** The promotion is active as soon as you create it. * **Start Later:** Set a custom start date and time. * **End Date:** The promotion automatically ends at your specified date and time. ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2F95496035-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fx0ylFv11SuG05Xj0pGLn%252Fuploads%252Fl1G2YeB3VXHVtMmFimLn%252FScreenshot%25202025-06-19%2520at%252010.13.30%25E2%2580%25AFAM.png%3Falt%3Dmedia%26token%3Ddb1b6981-d021-4376-b266-7ecae029406e&width=768&dpr=3&quality=100&sign=9fe9fc4a&sv=2) Promotions Actions (Edit/Enable/Disable) 💡 In the Offerwall > Promotions section, publishers can view all their promotions and easily edit, activate, deactivate any promotion directly from the list. [PreviousServer-to-Server (S2S) Callback Configurationchevron-left](https://pubscale.gitbook.io/offerwall-sdk/server-to-server-s2s-callback-configuration) [NextSandbox Environmentchevron-right](https://pubscale.gitbook.io/offerwall-sdk/sandbox-environment/sandbox-environment) Last updated 9 months ago * [1\. Creating a Promotion](https://pubscale.gitbook.io/offerwall-sdk/promotions#id-1.-creating-a-promotion) * [1.1. Promotion Details](https://pubscale.gitbook.io/offerwall-sdk/promotions#id-1.1.-promotion-details) * [2\. How Promotions Work](https://pubscale.gitbook.io/offerwall-sdk/promotions#id-2.-how-promotions-work) * [3\. Promotion Scheduling](https://pubscale.gitbook.io/offerwall-sdk/promotions#id-3.-promotion-scheduling) sun-brightdesktopmoon sun-brightdesktopmoon --- # Samples | 1.0.6-beta1 | Offerwall SDK 1. [Sample integration - GitRepo - Kotlinarrow-up-right](https://github.com/GreedyGame/sdkone-android-samples/tree/main/kotlin/OfferWallExample) 2. [Sample integration - GitRepo - Javaarrow-up-right](https://github.com/GreedyGame/sdkone-android-samples/tree/main/java/OfferWallExample) 3. [Sample apparrow-up-right](https://pro.chillar.co.in/download) [PreviousSandbox Environmentchevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1/sandbox-environment/sandbox-environment) --- # Initialize the SDK | 1.0.7 | Offerwall SDK To initialize the SDK, call the PubscaleOfferwall.init() method. Pass the app API key (generated from the console) as the first parameter of the init method. Make sure to call the init method as soon as your app starts up, ideally in app.js or index.js. #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/react-native/initialize-the-sdk#optional-parameters) Optional Parameters: **user\_id:** Pass your user's id in this field to tag your user. This id will be sent along with the S2S callback. Make sure to call the init function every time the user id changes. **background\_Base64:** An image that will be displayed as a banner on top of the offer wall. Pass the image in base64 encoded format. The background will be black by default. **appicon\_Base64:** An image that will be displayed in the center on the top banner of the offerwall. Pass the image in base64 encoded format. Default value is the app icon. ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/react-native/initialize-the-sdk#initializing-the-sdk) Initializing the SDK circle-info Use sandbox environment app ID for testing purposes. [Sandbox Environment](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/sandbox-environment/sandbox-environment) - Learn how to setup Sandbox environment Copy import {NativeModules, Alert} from 'react-native'; const {PubscaleOfferwall} = NativeModules; //initialises the SDK. //call init once the user is logged in. PubscaleOfferwall.init( "APP_ID", { "user_id": "test-user", //optional, but require to tag user to offer completion. "background_Base64": base64Image, "appicon_Base64": app64Image, //optional }, () => { //onSuccess Callback console.log("success") }, (errMsg)=>{ //onFailure Callbacks console.log(errMsg) }) The SDK Initialization is complete. Learn how to launch the offerwall in the next step. [PreviousSetting up the SDKchevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/react-native/setting-up-the-sdk) [NextStart the OfferWallchevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/react-native/start-the-offerwall) Last updated 1 year ago --- # Setting up the SDK | 1.0.7 | Offerwall SDK #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/react-native/setting-up-the-sdk#id-1.-add-this-to-your-build.gradle-file) 1\. Add this to your build.gradle file Add the below line inside the **dependencies** block in your build.gradle file Kotlin Script Groovy Copy implementation('com.pubscale.sdkone:offerwall:1.0.7') Copy implementation 'com.pubscale.sdkone:offerwall:1.0.7' #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/react-native/setting-up-the-sdk#id-2.-clean-build-and-rebuild-the-project) 2\. Clean build and Rebuild the project #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/react-native/setting-up-the-sdk#id-3.-configure-proguard-rules) 3\. Configure proguard rules For the SDK to work properly in release(obfuscated/minified) builds, add the following rules in your proguard-rules.pro file. proguard-rules.pro Copy -keep class com.pubscale.sdkone.offerwall.** {*;} -keep class com.pubscale.caterpillar.analytics.** {*;} #Supporting R8 full mode -keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation -keep,allowobfuscation,allowshrinking interface retrofit2.Call -keep,allowobfuscation,allowshrinking class retrofit2.Response We have added the SDK to the project. Learn how to initialize the SDK in the next step #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/react-native/setting-up-the-sdk#id-5.-add-native-module-files) 5\. Add native module files Add the following files to your android app's module directory. * [PubscaleOfferwallSdkModule.javaarrow-up-right](https://storage.googleapis.com/pubscale-offerwall/lib/PubscaleOfferwallSdkModule.java) * [PubscaleOfferwallSdkPackage.javaarrow-up-right](https://storage.googleapis.com/pubscale-offerwall/lib/PubscaleOfferwallSdkPackage.java) #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/react-native/setting-up-the-sdk#id-6.-link-the-module) 6\. Link the module Add the following line inside the getPackages() method of MainApplication class. `packages.add(new PubscaleOfferwallSdkPackage());` ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fhi3J82Irfk38cjMHFvTF%2Fblobs%2FczhHuDSTWk8hwZSMKZM2%2Fimage.png&width=768&dpr=3&quality=100&sign=14800036&sv=2) Adding PubscaleOfferwallSdkPackage to React packages We have setup the SDK in the project. Learn how to initialize the SDK in the next step [PreviousStart the OfferWallchevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/native-android/start-the-offerwall) [NextInitialize the SDKchevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/react-native/initialize-the-sdk) Last updated 1 year ago --- # Prerequisites | 1.0.6-beta1 | Offerwall SDK ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1/prerequisites/prerequisites#before-starting-the-integration-make-a-quick-check-of-the-things-listed-below) Before starting the integration, make a quick check of the things listed below: 1. You have a [PubScale App ID](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1/prerequisites/pubscale-onboarding) and you have created an offerwall placement 2. Ensure your application builds without any errors BEFORE adding the SDK [PreviousWelcome to PubScale Offerwall SDKchevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1) [NextPubScale Onboardingchevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1/prerequisites/pubscale-onboarding) --- # Start the OfferWall | 1.0.7 | Offerwall SDK To start the offerwall, just call, `OfferWall.launch(Context, OfferWallListener);` A listener can be set to listen for events fired by the Offer Wall. Kotlin Java Copy import com.pubscale.sdkone.offerwall.OfferWall import com.pubscale.sdkone.offerwall.models.OfferWallListener import com.pubscale.sdkone.offerwall.models.Reward .. .. .. val offerWallListener = object : OfferWallListener{ override fun onOfferWallShowed() { Log.d(TAG, "Offer wall showed.") } override fun onOfferWallClosed() { Log.d(TAG, "Offer wall closed.") } override fun onRewardClaimed(reward: Reward) { Log.d(TAG, "Offer wall reward claimed.") } override fun onFailed(message: String) { Log.d(TAG, "onFailed: $message") } } circle-info onRewardClaimed callback gives you the reward amount and currency details. To start the OfferWall, call the launch method of the OfferWall class. Kotlin Java [PreviousInitialize the SDKchevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/native-android/initialize-the-sdk) [NextSetting up the SDKchevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/react-native/setting-up-the-sdk) Last updated 1 year ago Copy import com.pubscale.sdkone.offerwall.OfferWall import com.pubscale.sdkone.offerwall.models.OfferWallListener import com.pubscale.sdkone.offerwall.models.Reward .. .. OfferWallListener offerWallListener = new OfferWallListener() { @Override public void onOfferWallShowed() { Log.d(TAG, "Offer wall showed."); } @Override public void onOfferWallClosed() { Log.d(TAG, "Offer wall closed."); } @Override public void onRewardClaimed(@NonNull Reward reward) { Log.d(TAG, "Offer wall reward claimed."); } @Override public void onFailed(@NonNull String message) { Log.d(TAG, "onFailed: " + message); } }; Copy import com.pubscale.sdkone.offerwall.OfferWall import com.pubscale.sdkone.offerwall.models.OfferWallListener .. .. OfferWall.launch(context, offerWallListener) Copy import com.pubscale.sdkone.offerwall.OfferWall import com.pubscale.sdkone.offerwall.models.OfferWallListener .. .. OfferWall.launch(context, offerWallListener); --- # Samples | 1.0.9 | Offerwall SDK 1. [Sample integration - GitRepo - Kotlinarrow-up-right](https://github.com/GreedyGame/sdkone-android-samples/tree/main/kotlin/OfferWallExample) 2. [Sample integration - GitRepo - Javaarrow-up-right](https://github.com/GreedyGame/sdkone-android-samples/tree/main/java/OfferWallExample) 3. [Sample apparrow-up-right](https://play.google.com/store/apps/details?id=app.quick.money.earn.joy) [PreviousSandbox Environmentchevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/sandbox-environment/sandbox-environment) [NextFAQschevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/faqs) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Prerequisites | 1.0.7 | Offerwall SDK ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/prerequisites/prerequisites#before-starting-the-integration-make-a-quick-check-of-the-things-listed-below) Before starting the integration, make a quick check of the things listed below: 1. You have a [PubScale App ID](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/prerequisites/pubscale-onboarding) and you have created an offerwall placement 2. Ensure your application builds without any errors BEFORE adding the SDK [PreviousWelcome to PubScale Offerwall SDKchevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.7) [NextPubScale Onboardingchevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/prerequisites/pubscale-onboarding) Last updated 1 year ago --- # Setting up the SDK | 1.0.7 | Offerwall SDK ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/unity/setting-up-the-sdk#id-1.-add-the-offerwall-unity-plugin-to-your-unity-project) **1\. Add the OfferWall Unity plugin to your Unity project** [Downloadarrow-up-right](https://github.com/GreedyGame/unity-offer_wall_plugin/releases/latest) and import the latest version of OfferWall Unity Plugin from GitHub. ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/unity/setting-up-the-sdk#id-2.-configuring-publishing-settings) **2\. Configuring Publishing Settings** * Set the minimum API level to 24 or above and the target API level to 33 or above under Edit/ProjectSettings/Player/Other Settings * Make sure you check the below-mentioned checkboxes under Edit/ProjectSettings/Player/Publishing Settings. * **Custom Main Manifest** * **Custom Main Gradle Template** * **Custom Gradle Settings Template** ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2F2425324002-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fhi3J82Irfk38cjMHFvTF%252Fuploads%252FbhnbN0kpLWTXZNUiquh6%252FScreenshot%25202024-05-09%2520at%25201.06.50%25E2%2580%25AFPM.png%3Falt%3Dmedia%26token%3D7f02e2a1-5b1b-414d-8e71-90035f1e1801&width=768&dpr=3&quality=100&sign=befc650d&sv=2) Player > Publishing settings ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/unity/setting-up-the-sdk#id-3.-configuring-dependencies) **3\. Configuring dependencies** Adding `mavenCentral()` as a repository in `settingsTemplate.gradle` Add the below line inside the dependencies block in your mainTemplate.gradle file ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/unity/setting-up-the-sdk#id-4.-force-resolve-dependencies) **4\. Force resolve dependencies** **Force resolve** forces the Package Manager to resolve the project’s packages, reinstalling any altered or missing package and removing extraneous packages. To Force resolve the dependencies, Goto Assets > External Dependency Manager > Android Resolver > Force Resolve (if the resolver did not open automatically) ![](https://pubscale.gitbook.io/~gitbook/image?url=https%3A%2F%2F3371507213-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FaUVG0uxfukyc5xCdlEhZ%252Fuploads%252FUzYUObvgE35BpwNoljLm%252Fimage.png%3Falt%3Dmedia%26token%3Dbd15261f-4718-4073-ae62-8839fe558896&width=768&dpr=4&quality=100&sign=c95a673969eca060eea708c9fdc31002608f810ed2f72bebef304fa7c837926b) Assets > External Dependency Manager > Android Resolver > Force Resolve [PreviousPreintegration Checkschevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/unity/preintegration-checks) [NextIntegrationchevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/unity/integration) Last updated 1 year ago * [1\. Add the OfferWall Unity plugin to your Unity project](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/unity/setting-up-the-sdk#id-1.-add-the-offerwall-unity-plugin-to-your-unity-project) * [2\. Configuring Publishing Settings](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/unity/setting-up-the-sdk#id-2.-configuring-publishing-settings) * [3\. Configuring dependencies](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/unity/setting-up-the-sdk#id-3.-configuring-dependencies) * [4\. Force resolve dependencies](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/unity/setting-up-the-sdk#id-4.-force-resolve-dependencies) Copy pluginManagement { repositories { **ARTIFACTORYREPOSITORY** gradlePluginPortal() google() } } include ':launcher', ':unityLibrary' **INCLUDES** dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS) repositories { **ARTIFACTORYREPOSITORY** google() mavenCentral() //<----------------Add this line flatDir { dirs "${project(':unityLibrary').projectDir}/libs" } } } Copy implementation 'com.pubscale.sdkone:offerwall:1.0.7' --- # Direct Link | 1.0.7 | Offerwall SDK ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/web/direct-link#to-create-a-direct-link-to-pubscale-offerwall-add-an-anchor-tag-in-your-html-that-redirects-to-the-p) To create a direct link to Pubscale Offerwall, add an anchor tag in your HTML that redirects to the Pubscale Offerwall. It's best to use an image or button rather than a text link for this purpose. Copy Pubscale Offerwall Parameter Required Comment app\_id yes Get it from the PubScale Dashboard user\_id yes Unique User ID [PreviousIFrame integrationchevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/web/iframe-integration) [NextS2S Callback Configurationchevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/s2s-callback-configuration/s2s-callback-configuration) Last updated 1 year ago --- # Launch the offerwall | 1.0.7 | Offerwall SDK Add the below code into the widget where you want to launch the offerwall from Copy void launchOfferwall(String appId, String userId) async{ await launchUrlInCustomTabs( Uri.parse("https://wow.pubscale.com/?app_id=${appId}&user_id=${userId}"), ); } Future launchUrlInCustomTabs(Uri uri) async { final theme = Theme.of(context); try { await launchUrl( uri, options: LaunchOptions( barColor: theme.colorScheme.surface, onBarColor: theme.colorScheme.onSurface, barFixingEnabled: false, ), ); } catch (e) { // If the URL launch fails, an exception will be thrown. (For example, if no browser app is installed on the Android device.) debugPrint(e.toString()); } } ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/flutter/launch-the-offerwall#launching-the-offerwall) Launching the Offerwall To launch the offerwall, simply call the launchOfferwall() method with the pubscale app id and your app's user id as the parameters. [PreviousAdding the dependencieschevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/flutter/adding-the-dependencies) [NextPreintegration Checkschevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/unity/preintegration-checks) Last updated 1 year ago Copy launchOfferwall("OFFERWALL_APP_ID", "USER_ID"); --- # Setting up the SDK | 1.0.7 | Offerwall SDK #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/native-android/setting-up-the-sdk#id-1.-add-this-to-your-build.gradle-file) 1\. Add this to your build.gradle file Add the below line inside the **dependencies** block in your build.gradle file Kotlin Script Groovy Copy implementation('com.pubscale.sdkone:offerwall:1.0.7') Copy implementation 'com.pubscale.sdkone:offerwall:1.0.7' #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/native-android/setting-up-the-sdk#id-2.-clean-build-and-rebuild-the-project) 2\. Clean build and Rebuild the project #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/native-android/setting-up-the-sdk#id-3.-configure-proguard-rules) 3\. Configure proguard rules For the SDK to work properly in release(obfuscated/minified) builds, add the following rules in your proguard-rules.pro file. proguard-rules.pro Copy -keep class com.pubscale.sdkone.offerwall.** {*;} -keep class com.pubscale.caterpillar.analytics.** {*;} #Supporting R8 full mode -keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation -keep,allowobfuscation,allowshrinking interface retrofit2.Call -keep,allowobfuscation,allowshrinking class retrofit2.Response We have added the SDK to the project. Learn how to initialize the SDK in the next step [PreviousPubScale Onboardingchevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/prerequisites/pubscale-onboarding) [NextInitialize the SDKchevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/native-android/initialize-the-sdk) Last updated 1 year ago --- # Adding the dependencies | 1.0.7 | Offerwall SDK #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/flutter/adding-the-dependencies#id-1.-add-this-to-your-pubspec.yaml-file) 1\. Add this to your pubspec.yaml file Add the below line inside the **dependencies** block in your pubspec.yaml file Copy dependencies: flutter_custom_tabs: ^2.1.0 #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/flutter/adding-the-dependencies#id-2.-rebuild-the-project) 2\. Rebuild the project [PreviousStart the OfferWallchevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/react-native/start-the-offerwall) [NextLaunch the offerwallchevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/flutter/launch-the-offerwall) Last updated 1 year ago --- # iOS | Offerwall SDK [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/ios#id-1.-integration) 1\. Integration ----------------------------------------------------------------------------------------------------------------- circle-exclamation **Before you start** To set up the PubScale Offerwall, you’ll need to add your app to our platform. Follow this guide for instructions on [how to set up your app](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/setting-up-your-app) . Once completed, you will receive a unique 8-digit app ID. ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fx0ylFv11SuG05Xj0pGLn%2Fblobs%2FqezM0kmxXdVWJkgQBBok%2FWow_flow%2520%281%29.png&width=768&dpr=3&quality=100&sign=2a4dde4a&sv=2)![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fx0ylFv11SuG05Xj0pGLn%2Fblobs%2FluDiQcm4sdLejDTuGlzU%2Fwow_flow_dark.png&width=768&dpr=3&quality=100&sign=ef70fe3f&sv=2) To integrate the PubScale Offerwall, you need to construct a URL and provide a set of parameters for proper configuration. **Construct the Offerwall URL** **Parameters** Parameters Description **app\_id** (Required) This is the unique identifier for your app, required for integration. **user\_id** (Required) A unique identifier for each user, required to track their activity on the offerwall. We recommend using a UUID as the user\_id. **idfa** (Optional but Recommended) For iOS integrations Include the **idfa** as a parameter when launching the Offerwall. This helps enhance tracking accuracy and plays a key role in fraud prevention. To integrate the PubScale Offerwall into your iOS App, you have the following options: ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/ios#using-sfsafariviewcontroller) Using SFSafariViewController: For optimal performance and user experience, we recommend launching the Offerwall using `SFSafariViewController` Here's a simple Swift example that opens PubScale Offerwall in a `SFSafariViewController` on iOS #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/ios#notes) Notes: * This code should be placed in a `UIViewController` subclass. * You can call `openLinkInSafariViewController()` when appropriate (e.g., on a button tap or in `viewDidLoad` as shown). * Don't forget to import `SafariServices`. * Don't forget to replace the {app\_id} ,{user\_id} and {idfa} with the actula value. * If your App is not approved from PubScale you might see an error page. ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fx0ylFv11SuG05Xj0pGLn%2Fblobs%2FHacO5ha0ife9UqM2nrQL%2FScreenshot%25202025-04-23%2520at%25205.19.10%25E2%2580%25AFPM.png&width=300&dpr=3&quality=100&sign=39932216&sv=2) If you see this error, * Check your App ID and make sure it is correct. * If your App ID is correct then its possible your App ID is not approved yet, in that case please reach out to your Account Manager to get your App approved. If your configuration is correct, you will see a page similar to the screenshot below. ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fx0ylFv11SuG05Xj0pGLn%2Fblobs%2FP7eukHoE3cc0C4YrsoCC%2FScreenshot%25202025-04-23%2520at%25205.30.08%25E2%2580%25AFPM.png&width=300&dpr=3&quality=100&sign=bce9ed7b&sv=2) [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/ios#id-3.-test-the-offerwall) 2\. Setup Server-to-Server(S2S) callbacks -------------------------------------------------------------------------------------------------------------------------------------------------- Set up the Server-to-Server (S2S) callbacks to receive instant updates whenever a user completes an offer and earns a reward. When an offer is completed, our server will send a notification to the configured callback URL. This callback provides the necessary information to process and verify the reward for the user in your application. [Learn more.](https://pubscale.gitbook.io/offerwall-sdk/server-to-server-s2s-callback-configuration) [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/ios#id-3.-test-the-offerwall-1) 3\. Test the OfferWall --------------------------------------------------------------------------------------------------------------------------------- circle-info Please use the sandbox environment for testing purposes to get instant callbacks and rewards. To learn how to enable the Sandbox environment, [click here](https://pubscale.gitbook.io/offerwall-sdk/sandbox-environment/sandbox-environment) . To ensure your OfferWall integration is working perfectly, follow these steps during the testing phase. * Open the offerwall and verify that all offers are displayed correctly. * Complete an offer and confirm that a callback is received from PubScale server to your server. For the sandbox environment, ensure the callback URL is configured properly to receive sandbox callbacks. * Ensure the hashing technique used matches the one specified in the documentation. * Verify that the reward value received matches the value displayed for the offer. * Confirm that the callback is received only from PubScale's [whitelisted server IPs](https://pubscale.gitbook.io/offerwall-sdk/s2s-callback-configuration/ip-whitelist) . [PreviousWebchevron-left](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/web) [NextAPIchevron-right](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/api) * [1\. Integration](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/ios#id-1.-integration) * [Using SFSafariViewController:](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/ios#using-sfsafariviewcontroller) * [2\. Setup Server-to-Server(S2S) callbacks](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/ios#id-3.-test-the-offerwall) * [3\. Test the OfferWall](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/ios#id-3.-test-the-offerwall-1) sun-brightdesktopmoon Copy https://wow.pubscale.com?app_id={app_id}&user_id={user_id}&idfa={idfa} Copy import UIKit import SafariServices class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() openLinkInSafariViewController() } func openLinkInSafariViewController() { if let url = URL(string: "https://wow.pubscale.com?app_id={app_id}&user_id={user_id}&idfa={idfa}") { let safariVC = SFSafariViewController(url: url) safariVC.modalPresentationStyle = .formSheet present(safariVC, animated: true, completion: nil) } else { print("Invalid URL") } } } sun-brightdesktopmoon --- # FAQs | 1.0.9 | Offerwall SDK chevron-rightHow do I create an PubScale Offerwall Placement/How do I get Offerwall App ID?[hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/faqs#how-do-i-create-an-pubscale-offerwall-placement-how-do-i-get-offerwall-app-id) Refer to the content below. [Setting up your app](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/setting-up-your-app) chevron-rightHow do I show my currency icon on the PubScale Offerwall?[hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/faqs#how-do-i-show-my-currency-icon-on-the-pubscale-offerwall) While setting up the offerwall, you can add an icon for your currency. This icon can also be uploaded later on the app details page after creating the offerwall. chevron-rightHow do I test the Offerwall Integration?[hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/faqs#how-do-i-test-the-offerwall-integration) To test the integration, you can make use of the [sandbox environment](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/sandbox-environment/sandbox-environment) . Sandbox environment will have test offers which are very easy to complete. Upon completion of these offers you will receive S2S postbacks on the configured Sandbox S2S URL. chevron-rightHow to reach to the PubScale team?[hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/faqs#how-to-reach-to-the-pubscale-team) Email us at [info@pubscale.comenvelope](mailto:info@pubscale.com) chevron-rightHow to get approval for web integration?[hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/faqs#how-to-get-approval-for-web-integration) Contact to your Account Manager or email us at [info@pubscale.comenvelope](mailto:info@pubscale.com) [PreviousSampleschevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/samples) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # React Native | Offerwall SDK circle-exclamation **Before you start** To set up the PubScale Offerwall, you’ll need to add your app to our platform. Follow this guide for instructions on [how to set up your app](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/setting-up-your-app) . Once completed, you will receive a unique 8-digit app ID. circle-info You can download the Sample integration from [GitHubarrow-up-right](https://github.com/GreedyGame/demo-offerwall-react-native) [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/react-native#id-1.-add-this-to-your-build.gradle-file) 1\. Add this to your build.gradle file ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Add the below line inside the **dependencies** block in your build.gradle file Kotlin Script Groovy Copy implementation("com.pubscale.sdkone:offerwall:1.0.11") Copy implementation 'com.pubscale.sdkone:offerwall:1.0.11' [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/react-native#id-2.-configure-proguard-rules) 2\. Configure proguard rules ---------------------------------------------------------------------------------------------------------------------------------------------------- For the SDK to work properly in release(obfuscated/minified) builds, add the following rules in your proguard-rules.pro file. proguard-rules.pro Copy -keep class com.pubscale.sdkone.offerwall.** {*;} -keep class com.pubscale.caterpillar.analytics.** {*;} #Supporting R8 full mode -keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation -keep,allowobfuscation,allowshrinking interface retrofit2.Call -keep,allowobfuscation,allowshrinking class retrofit2.Response We have added the SDK to the project. Learn how to initialize the SDK in the next step [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/react-native#id-3.-add-native-module-files) 3\. Add native module files -------------------------------------------------------------------------------------------------------------------------------------------------- Add the files in the zip file to your app's android module under app folder. Java Kotlin Download the **pubscale\_ow\_java.zip** from the below link [https://github.com/greedyraagava/demo-offerwall-react-native/releases/latestarrow-up-right](https://github.com/greedyraagava/demo-offerwall-react-native/releases/latest) Download the **pubscale\_ow\_kotlin.zip** from the below link [https://github.com/greedyraagava/demo-offerwall-react-native/releases/latestarrow-up-right](https://github.com/greedyraagava/demo-offerwall-react-native/releases/latest) ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/react-native#id-3.1.-link-the-module) 3.1. Link the module Java Kotlin Add the following line inside the getPackages() method of MainApplication class ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2F95496035-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fx0ylFv11SuG05Xj0pGLn%252Fuploads%252FlbZziwDNTCnpD2Zb8VOV%252FScreenshot%25202025-07-02%2520at%25205.16.36%25E2%2580%25AFPM.png%3Falt%3Dmedia%26token%3Dcc29cd68-30cc-49e7-af41-307e301c1c6b&width=768&dpr=3&quality=100&sign=b50d15e1&sv=2) Adding PubscaleOfferwallSdkPackage to React packages Add the following line inside the getPackages() method of MainApplication class ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2F95496035-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fx0ylFv11SuG05Xj0pGLn%252Fuploads%252FopMj9KYcDGUJzab8PJBo%252FScreenshot%25202025-07-02%2520at%25205.11.06%25E2%2580%25AFPM.png%3Falt%3Dmedia%26token%3Dd6fe7593-dba2-4685-b671-bb79a387fef1&width=768&dpr=3&quality=100&sign=3634bed1&sv=2) Adding PubscaleOfferwallSdkPackage to React packages [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/react-native#id-4.-initialize-the-sdk) 4\. Initialize the SDK ---------------------------------------------------------------------------------------------------------------------------------------- To initialize the SDK, call the PubscaleOfferwall.init() method. Pass the app\_id (generated from the console) as the first parameter of the init method. Make sure to call the init method as soon as your app starts up, ideally in app.js or index.js. circle-info Obtain your **app\_id** from the [PubScale Dashboardarrow-up-right](https://dashboard.pubscale.com/) by [adding your app and configuring the offerwall.](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/setting-up-your-app) Once completed, you will receive a unique 8-digit app ID. #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/react-native#optional-parameters) Optional Parameters: Parameter Description **user\_id** Pass your user's id in this field to tag your user. This id will be sent along with the S2S callback. Make sure to call the init function every time the user id changes. **background\_Base64** An image that will be displayed as a banner on top of the offer wall. Pass the image in base64 encoded format. The background will be black by default. **appicon\_Base64** An image that will be displayed in the center on the top banner of the offerwall. Pass the image in base64 encoded format. Default value is the app icon. **sandbox** Enables the sandbox environment for the Offerwall Session ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/react-native#id-4.1.-making-the-init-call) 4.1. Making the Init call circle-info Use sandbox parameter for testing purposes. [Sandbox Environment](https://pubscale.gitbook.io/offerwall-sdk/sandbox-environment/sandbox-environment) - Learn how to setup Sandbox environment [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/react-native#id-5.-start-the-offerwall) 5\. Start the OfferWall ------------------------------------------------------------------------------------------------------------------------------------------ To start the offerwall, just call, `PubscaleOfferwall.launch()` method. [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/react-native#id-3.-test-the-offerwall) 6\. Setup S2S callbacks ----------------------------------------------------------------------------------------------------------------------------------------- Setup the S2S callbacks to get instant updates whenever the user gets the reward. You can use this callback to reward the user in your application. [Learn more.](https://pubscale.gitbook.io/offerwall-sdk/server-to-server-s2s-callback-configuration) [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/react-native#id-3.-test-the-offerwall-1) 7\. Test the OfferWall ------------------------------------------------------------------------------------------------------------------------------------------ circle-info Please use the sandbox environment for testing purposes to get instant callbacks and rewards. To learn how to enable the Sandbox environment, [click here](https://pubscale.gitbook.io/offerwall-sdk/sandbox-environment/sandbox-environment) . Finally, To test the offerwall, build the application to an actual device. Check if you can launch the Offerwall and get the appropriate callbacks. [PreviousAndroid Integrationchevron-left](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/android-integration) [NextFlutterchevron-right](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/flutter) Last updated 8 months ago * [1\. Add this to your build.gradle file](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/react-native#id-1.-add-this-to-your-build.gradle-file) * [2\. Configure proguard rules](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/react-native#id-2.-configure-proguard-rules) * [3\. Add native module files](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/react-native#id-3.-add-native-module-files) * [3.1. Link the module](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/react-native#id-3.1.-link-the-module) * [4\. Initialize the SDK](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/react-native#id-4.-initialize-the-sdk) * [4.1. Making the Init call](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/react-native#id-4.1.-making-the-init-call) * [5\. Start the OfferWall](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/react-native#id-5.-start-the-offerwall) * [6\. Setup S2S callbacks](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/react-native#id-3.-test-the-offerwall) * [7\. Test the OfferWall](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/react-native#id-3.-test-the-offerwall-1) sun-brightdesktopmoon Copy packages.add(new PubscaleOfferwallPackage()) Copy packages.add(PubscaleOfferwallPackage()) Copy import {NativeModules, Alert} from 'react-native'; const {PubscaleOfferwall} = NativeModules; //Initializes the SDK //call init once the user is logged in PubscaleOfferwall.init( "app_id", { "user_id": "test-user", //optional, but require to tag user to offer completion. "sandbox": false, //set it to true to enable sandbox mode "background_Base64": base64Image, //optional "appicon_Base64": app64Image, //optional }, () => { //onSuccess Callback console.log("success") }, (errMsg)=>{ //onFailure Callback console.log(errMsg) }) Copy PubscaleOfferwall.launch( () => { // Offerwall Showed Callback console.log("Offerwall launched"); }, () => { // Offerwall Closed Callback console.log("Offerwall closed"); }, (amt, curr, token) => { // Offerwall Rewarded Callback console.log("Reward:", amt, curr, token); }, (err) => { // Offerwall Error Callback console.log("Launch error:", err); } ); sun-brightdesktopmoon --- # Setting up your app | Offerwall SDK ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/setting-up-your-app#id-1.-create-an-account) 1\. Create an account Create an account with PubScale through the dashboard at [https://dashboard.pubscale.comarrow-up-right](https://dashboard.pubscale.com/) ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/setting-up-your-app#id-2.-creating-an-offerwall-unit) 2\. Creating an Offerwall Unit Once you have signed in, you can access Offerwall from the side navigation list. 1. Click on the **Offerwall** item on the navigation list ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fx0ylFv11SuG05Xj0pGLn%2Fblobs%2FIUK75Defcij42uSdSQN1%2FGroup%252078578.png&width=768&dpr=3&quality=100&sign=9c33f374&sv=2) 1. Next, create an Offerwall placement for the app by clicking on the **Create Offerwall** button and create the offerwall unit by providing the required details and config. ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fx0ylFv11SuG05Xj0pGLn%2Fblobs%2FvIbmAuD4uMH5SBx0LxED%2FGroup%252078579.png&width=768&dpr=3&quality=100&sign=638569f1&sv=2) 1. Once you’ve created your app in the dashboard and selected the desired integration type (Android SDK, Web Integration, or API), your app will enter a **Pending Approval** state. circle-exclamation The approval process is **asynchronous** and typically takes **up to 72 hours** as our team manually reviews each submission. This **does not block your integration** process. We strongly recommend proceeding with the integration immediately. You can use **sandbox mode** to view and test offers while your app is pending approval. Please make sure to follow the **integration checklist** to ensure you don’t miss any required steps before going live. Once the app is approved, it may take up to 5 minutes for all changes to fully propagate. If you encounter any errors, please wait for 5 minutes after receiving the approval confirmation. ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/setting-up-your-app#id-3.-before-you-go-live) 3\. Before you go live You can find the checklist by clicking on the **Integration Steps** card ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fx0ylFv11SuG05Xj0pGLn%2Fblobs%2FcKbcguIEQbGYUHREglfd%2FScreenshot%25202025-05-21%2520at%252012.55.22%25E2%2580%25AFPM.png&width=768&dpr=3&quality=100&sign=7e3fc037&sv=2) Please make sure you have completed all the steps in the checklist and mark it as completed. ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fx0ylFv11SuG05Xj0pGLn%2Fblobs%2FslR3webIlGxByyWsvuwk%2FScreenshot%25202025-05-21%2520at%252012.55.30%25E2%2580%25AFPM.png&width=768&dpr=3&quality=100&sign=94a7e34c&sv=2) [PreviousWelcome to PubScale Offerwall SDKchevron-left](https://pubscale.gitbook.io/offerwall-sdk) [NextAndroid Integrationchevron-right](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/android-integration) * [1\. Create an account](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/setting-up-your-app#id-1.-create-an-account) * [2\. Creating an Offerwall Unit](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/setting-up-your-app#id-2.-creating-an-offerwall-unit) * [3\. Before you go live](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/setting-up-your-app#id-3.-before-you-go-live) sun-brightdesktopmoon sun-brightdesktopmoon --- # Android Integration | Offerwall SDK circle-exclamation **Before you start** To set up the PubScale Offerwall, you’ll need to add your app to our platform. Follow this guide for instructions on [how to set up your app](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/setting-up-your-app) . Once completed, you will receive a unique 8-digit app ID. circle-info You can download the Sample integration from [GitHubarrow-up-right](https://github.com/greedygame/demo-offerwall-android) Integration video [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/android-integration#id-1.-add-this-to-your-build.gradle-file) 1\. Add this to your build.gradle file ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Add the below line inside the **dependencies** block in your build.gradle file. Once added, clean build and rebuild the project. Kotlin Script Groovy [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/android-integration#id-2.-configure-proguard-rules) 2\. Configure proguard rules ----------------------------------------------------------------------------------------------------------------------------------------------------------- For the SDK to work properly in release(obfuscated/minified) builds, add the following rules in your proguard-rules.pro file. [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/android-integration#id-3.-initializing-the-offerwall) 3\. Initializing the OfferWall --------------------------------------------------------------------------------------------------------------------------------------------------------------- You must initialize the SDK before using the SDK. To do this, call `Offerwall.init(OfferWallConfig, OfferWallInitListener)` . ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/android-integration#id-3.1.-parameters-for-init-call) **3.1. Parameters for init call:** * **OfferWallConfig offerWallConfig:** An object to pass configuration-related info to the SDK while initializing. Refer below for how to create an object of OfferWallConfig. * **OfferWallInitListener offerWallInitListener:** A listener that informs you if the SDK initialization was successful or not. In case of failure, it will also give you a string stating the cause of the failure. This parameter is optional. ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/android-integration#id-3.2.-creating-offerwallconfig-object) **3.2. Creating OfferWallConfig object:** Create an instance of OfferWallConfig using the builder class OfferWallConfig.Builder by passing the context and your PubScale app ID. circle-info Obtain your **PubScale app ID** from the [PubScale Dashboardarrow-up-right](https://dashboard.pubscale.com/) by [adding your app and configuring the offerwall.](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/setting-up-your-app) Once completed, you will receive a unique 8-digit app ID. circle-info Use sandbox environment app ID for testing purposes. [Sandbox Environment](https://pubscale.gitbook.io/offerwall-sdk/sandbox-environment/sandbox-environment) - Learn how to setup Sandbox environment Kotlin Java These are the public methods available for OfferWallConfig.Builder class: Public Methods Description setUniqueId(String uniqueId) Sets a unique id that will be used to identify the user uniquely. This will be sent back in the postback. setSandboxEnabled(Boolean isEnabled) Sets if the offerwall should open in the sandbox environment setLoaderBackgroundBitmap(Bitmap bitmap) Accepts a bitmap and uses it as the background image for the loader and offerwall top banner. Default: Black color image setLoaderForegroundBitmap(Bitmap bitmap) Accepts a bitmap and uses it as the foreground image for the loader and offerwall top banner. Default: App icon setFullscreenEnabled(Boolean isEnabled) Sets if the offerwall should open in fullscreen mode or not. This can be used in apps or games where an immersive experience is needed. Default: false build() Builds the config and returns OfferWallConfig instance triangle-exclamation If a unique ID is not set, rewarding the user is not guaranteed. ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/android-integration#id-3.3.-making-the-init-call) **3.3. Making the init call:** Initialize the OfferWall SDK by calling the init function by passing the offer wall config. Kotlin Java circle-exclamation Make sure to handle Offerwall init failures properly as the init might fail in scenarios where the PubScale system detects a fraudulent environment. circle-info If you need to change any config after initializing the SDK, you should destroy and re-init the SDK. To destroy, call `OfferWall.destroy()` [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/android-integration#id-4.-start-the-offerwall) 4\. Start the OfferWall ------------------------------------------------------------------------------------------------------------------------------------------------- To start the offerwall, just call, `OfferWall.launch(Context, OfferWallListener);` A listener can be set to listen for events fired by the Offer Wall. Kotlin Java circle-info onRewardClaimed callback gives you the reward amount and currency details. To start the OfferWall, call the launch method of the OfferWall class. Kotlin Java [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/android-integration#id-3.-test-the-offerwall) 5\. Setup S2S callbacks ------------------------------------------------------------------------------------------------------------------------------------------------ Setup the S2S callbacks to get instant updates whenever the user gets the reward. You can use this callback to reward the user in your application. [Learn more.](https://pubscale.gitbook.io/offerwall-sdk/server-to-server-s2s-callback-configuration) [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/android-integration#id-3.-test-the-offerwall-1) 6\. Test the OfferWall ------------------------------------------------------------------------------------------------------------------------------------------------- circle-info Please use the sandbox environment for testing purposes to get instant callbacks and rewards. To learn how to enable the Sandbox environment, [click here](https://pubscale.gitbook.io/offerwall-sdk/sandbox-environment/sandbox-environment) . Finally, To test the offerwall, build the application to an actual device. Check if you can launch the Offerwall and get the appropriate callbacks. [PreviousSetting up your appchevron-left](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/setting-up-your-app) [NextReact Nativechevron-right](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/react-native) Last updated 9 months ago * [1\. Add this to your build.gradle file](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/android-integration#id-1.-add-this-to-your-build.gradle-file) * [2\. Configure proguard rules](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/android-integration#id-2.-configure-proguard-rules) * [3\. Initializing the OfferWall](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/android-integration#id-3.-initializing-the-offerwall) * [3.1. Parameters for init call:](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/android-integration#id-3.1.-parameters-for-init-call) * [3.2. Creating OfferWallConfig object:](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/android-integration#id-3.2.-creating-offerwallconfig-object) * [3.3. Making the init call:](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/android-integration#id-3.3.-making-the-init-call) * [4\. Start the OfferWall](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/android-integration#id-4.-start-the-offerwall) * [5\. Setup S2S callbacks](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/android-integration#id-3.-test-the-offerwall) * [6\. Test the OfferWall](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/android-integration#id-3.-test-the-offerwall-1) sun-brightdesktopmoon Copy implementation("com.pubscale.sdkone:offerwall:1.0.11") Copy implementation 'com.pubscale.sdkone:offerwall:1.0.11' proguard-rules.pro Copy -keep class com.pubscale.sdkone.offerwall.** {*;} -keep class com.pubscale.caterpillar.analytics.** {*;} #Supporting R8 full mode -keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation -keep,allowobfuscation,allowshrinking interface retrofit2.Call -keep,allowobfuscation,allowshrinking class retrofit2.Response Copy import com.pubscale.sdkone.offerwall.OfferWallConfig .. .. val offerWallConfig = OfferWallConfig.Builder(context, "YOUR_PUBSCALE_APP_ID") .setUniqueId("unique_id") .setSandboxEnabled(false) //Change this to true to enable sandbox mode .build() Copy import com.pubscale.sdkone.offerwall.OfferWallConfig .. .. OfferWallConfig offerWallConfig = new OfferWallConfig.Builder(context, "YOUR_PUBSCALE_APP_ID") .setUniqueId("unique_id") .setSandboxEnabled(false) //Change this to true to enable sandbox mode .build(); Copy OfferWall.init(offerWallConfig, object : OfferWallInitListener { override fun onInitSuccess() { } override fun onInitFailed(error: InitError) { } }) Copy OfferWall.init(offerWallConfig, new OfferWallInitListener() { @Override public void onInitSuccess() { } @Override public void onInitFailed(@NonNull InitError error) { } }); Copy import com.pubscale.sdkone.offerwall.OfferWall import com.pubscale.sdkone.offerwall.models.OfferWallListener import com.pubscale.sdkone.offerwall.models.Reward .. .. .. val offerWallListener = object : OfferWallListener{ override fun onOfferWallShowed() { Log.d("PSOfferwall", "Offer wall showed.") } override fun onOfferWallClosed() { Log.d("PSOfferwall", "Offer wall closed.") } override fun onRewardClaimed(reward: Reward) { Log.d("PSOfferwall", "Offer wall reward claimed.") } override fun onFailed(message: String) { Log.d("PSOfferwall", "onFailed: $message") } } Copy import com.pubscale.sdkone.offerwall.OfferWall import com.pubscale.sdkone.offerwall.models.OfferWallListener import com.pubscale.sdkone.offerwall.models.Reward .. .. OfferWallListener offerWallListener = new OfferWallListener() { @Override public void onOfferWallShowed() { Log.d("PSOfferwall", "Offer wall showed."); } @Override public void onOfferWallClosed() { Log.d("PSOfferwall", "Offer wall closed."); } @Override public void onRewardClaimed(@NonNull Reward reward) { Log.d("PSOfferwall", "Offer wall reward claimed."); } @Override public void onFailed(@NonNull String message) { Log.d("PSOfferwall", "onFailed: " + message); } }; Copy import com.pubscale.sdkone.offerwall.OfferWall import com.pubscale.sdkone.offerwall.models.OfferWallListener .. .. OfferWall.launch(context, offerWallListener) Copy import com.pubscale.sdkone.offerwall.OfferWall import com.pubscale.sdkone.offerwall.models.OfferWallListener .. .. OfferWall.launch(context, offerWallListener); sun-brightdesktopmoon --- # Initialize the SDK | 1.0.6-beta1 | Offerwall SDK To initialize the SDK, call the PubscaleOfferwall.init() method. Pass the app API key (generated from the console) as the first parameter of the init method. Make sure to call the init method as soon as your app starts up, ideally in app.js or index.js. #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1/react-native/initialize-the-sdk#optional-parameters) Optional Parameters: **user\_id:** Pass your user's id in this field to tag your user. This id will be sent along with the S2S callback. Make sure to call the init function every time the user id changes. **background\_Base64:** An image that will be displayed as a banner on top of the offer wall. Pass the image in base64 encoded format. The background will be black by default. **appicon\_Base64:** An image that will be displayed in the center on the top banner of the offerwall. Pass the image in base64 encoded format. Default value is the app icon. ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1/react-native/initialize-the-sdk#initializing-the-sdk) Initializing the SDK circle-info Use sandbox environment app ID for testing purposes. [Sandbox Environment](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1/sandbox-environment/sandbox-environment) - Learn how to setup Sandbox environment Copy import {NativeModules, Alert} from 'react-native'; const {PubscaleOfferwall} = NativeModules; //initialises the SDK. //call init once the user is logged in. PubscaleOfferwall.init( "APP_ID", { "user_id": "test-user", //optional, but require to tag user to offer completion. "background_Base64": base64Image, "appicon_Base64": app64Image, //optional }, () => { //onSuccess Callback console.log("success") }, (errMsg)=>{ //onFailure Callbacks console.log(errMsg) }) The SDK Initialization is complete. Learn how to launch the offerwall in the next step. [PreviousSetting up the SDKchevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1/react-native/setting-up-the-sdk) [NextStart the OfferWallchevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1/react-native/start-the-offerwall) Last updated 2 years ago --- # Preintegration Checks | 1.0.7 | Offerwall SDK 1. Make sure you are using Unity version 2019.4.0f1 or above 2. Ensure your application builds without any errors before adding the plugin. 3. Android platform is selected for your Unity project. 4. The Editor must support Android Gradle version 4.0.1 or above. [PreviousLaunch the offerwallchevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/flutter/launch-the-offerwall) [NextSetting up the SDKchevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/unity/setting-up-the-sdk) Last updated 1 year ago --- # Welcome to PubScale Offerwall SDK | 1.0.9 | Offerwall SDK ![Page cover](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2F1235736282-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F9dUUmbZ8oNwa2CoHqvab%252Fuploads%252FIQmczo2TwxZ41xb2d8KF%252FGitbook%2520Offerwall.png%3Falt%3Dmedia%26token%3Dfbd06600-574c-40dd-817f-115a71ff68b2&width=1248&dpr=3&quality=100&sign=6c85820c&sv=2) [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.9#overview) Overview --------------------------------------------------------------------------------- The PubScale Offerwall SDK is an app monetization tool that allows developers to make incremental revenue by asking the user to complete some task in exchange for in-app currency. [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.9#benefits) Benefits --------------------------------------------------------------------------------- 1. Incremental revenue 2. Monetize non-paying users 3. Improves user retention [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.9#features) Features --------------------------------------------------------------------------------- 1. **Instant reward offers:** You get offers that give out instant rewards on completion. 2. **Fraud prevention:** Our inbuilt fraud detection and prevention system ensures that all the conversions that happen from the app are legit. 3. **Easy integration:** The SDK provides a straightforward integration process, and can be done within a few hours. [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.9#quick-links) Quick links --------------------------------------------------------------------------------------- 1. [PubScale dashboardarrow-up-right](https://dashboard.pubscale.com/) 2. [Sample app and code](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/samples) [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.9#get-started) Get Started --------------------------------------------------------------------------------------- We've put together some helpful guides for you to get set up with our SDK quickly and easily. [androidAndroid Integrationchevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/android-integration) [reactReact Nativechevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/react-native) [unityUnitychevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/unity) [browserWeb Offerwallchevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/web-offerwall) [🦉Server-to-Server (S2S) Callback Configurationchevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/server-to-server-s2s-callback-configuration) [NextSetting up your appchevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/setting-up-your-app) Last updated 1 year ago * [Overview](https://pubscale.gitbook.io/offerwall-sdk/1.0.9#overview) * [Benefits](https://pubscale.gitbook.io/offerwall-sdk/1.0.9#benefits) * [Features](https://pubscale.gitbook.io/offerwall-sdk/1.0.9#features) * [Quick links](https://pubscale.gitbook.io/offerwall-sdk/1.0.9#quick-links) * [Get Started](https://pubscale.gitbook.io/offerwall-sdk/1.0.9#get-started) sun-brightdesktopmoon sun-brightdesktopmoon --- # Initialize the SDK | 1.0.7 | Offerwall SDK You must initialize the SDK before using the SDK. To do this, call `Offerwall.init(OfferWallConfig, OfferWallInitListener)` . Parameters for init call: * **OfferWallConfig offerWallConfig:** An object to pass configuration-related info to the SDK while initializing. Refer below for how to create an object of OfferWallConfig. * **OfferWallInitListener offerWallInitListener:** A listener that informs you if the SDK initialization was successful or not. In case of failure, it will also give you a string stating the cause of the failure. This parameter is optional. ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/native-android/initialize-the-sdk#creating-offerwallconfig-object) **Creating OfferWallConfig object:** Create an instance of OfferWallConfig using the builder class OfferWallConfig.Builder by passing the context and your PubScale app ID. circle-info Use sandbox environment app ID for testing purposes. [Sandbox Environment](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/sandbox-environment/sandbox-environment) - Learn how to setup Sandbox environment Kotlin Java Copy import com.pubscale.sdkone.offerwall.OfferWallConfig .. .. val offerWallConfig = OfferWallConfig.Builder(context, "YOUR_PUBSCALE_APP_ID") .setUniqueId("unique_id") //optional, used to represent the user of your application .setLoaderBackgroundBitmap(backgroundBitmap) //optional .setLoaderForegroundBitmap(foreground) //optional .setFullscreenEnabled(false) //optional .build() Copy import com.pubscale.sdkone.offerwall.OfferWallConfig .. .. OfferWallConfig offerWallConfig = new OfferWallConfig.Builder(context, "YOUR_PUBSCALE_APP_ID") .setUniqueId("unique_id") //optional, used to represent the user of your application .setLoaderBackgroundBitmap(backgroundBitmap)//optional .setLoaderForegroundBitmap(foregroundBitmap)//optional .setFullscreenEnabled(false)//optional .build(); These are the public methods available for OfferWallConfig.Builder class: Public Methods Description setUniqueId(String uniqueId) Sets a unique id that will be used to identify the user uniquely. This will be sent back in the postback. setFullscreenEnabled(Boolean isEnabled) Sets if the offerwall should open in fullscreen mode or not. Default: false setLoaderBackgroundBitmap(Bitmap bitmap) Accepts a bitmap and uses it as the background image for the loader and offerwall top banner. Default: Black color image setLoaderForegroundBitmap(Bitmap bitmap) Accepts a bitmap and uses it as the foreground image for the loader and offerwall top banner. Default: App icon build() Builds the config and returns OfferWallConfig instance triangle-exclamation If a unique ID is not set, rewarding the user is not guaranteed. ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/native-android/initialize-the-sdk#undefined-1) ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/native-android/initialize-the-sdk#initialize-the-offerwall-sdk) **Initialize the Offerwall SDK:** Initialize the OfferWall SDK by calling the init function by passing the offer wall config. Kotlin Java circle-info OfferWallInitListener is an optional parameter in init() method. circle-info If you need to change any config after initializing the SDK, you should destroy and re-init the SDK. To destroy, call `OfferWall.destroy()` [PreviousSetting up the SDKchevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/native-android/setting-up-the-sdk) [NextStart the OfferWallchevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/native-android/start-the-offerwall) Last updated 1 year ago * [Creating OfferWallConfig object:](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/native-android/initialize-the-sdk#creating-offerwallconfig-object) * [](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/native-android/initialize-the-sdk#undefined-1) * [Initialize the Offerwall SDK:](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/native-android/initialize-the-sdk#initialize-the-offerwall-sdk) Copy OfferWall.init(offerWallConfig, object : OfferWallInitListener { override fun onInitSuccess() { } override fun onInitFailed(error: InitError) { } }) Copy OfferWall.init(offerWallConfig, new OfferWallInitListener() { @Override public void onInitSuccess() { } @Override public void onInitFailed(@NonNull InitError error) { } }); --- # Start the OfferWall | 1.0.6-beta1 | Offerwall SDK To start the offerwall, just call, `OfferWall.launch(Context, OfferWallListener);` A listener can be set to listen for events fired by the Offer Wall. Kotlin Java Copy import com.pubscale.sdkone.offerwall.OfferWall import com.pubscale.sdkone.offerwall.models.OfferWallListener import com.pubscale.sdkone.offerwall.models.Reward .. .. .. val offerWallListener = object : OfferWallListener{ override fun onOfferWallShowed() { Log.d(TAG, "Offer wall showed.") } override fun onOfferWallClosed() { Log.d(TAG, "Offer wall closed.") } override fun onRewardClaimed(reward: Reward) { Log.d(TAG, "Offer wall reward claimed.") } override fun onFailed(message: String) { Log.d(TAG, "onFailed: $message") } } circle-info onRewardClaimed callback gives you the reward amount and currency details. To start the OfferWall, call the launch method of the OfferWall class. Kotlin Java [PreviousInitialize the SDKchevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1/native-android/initialize-the-sdk) [NextSetting up the SDKchevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1/react-native/setting-up-the-sdk) Copy import com.pubscale.sdkone.offerwall.OfferWall import com.pubscale.sdkone.offerwall.models.OfferWallListener import com.pubscale.sdkone.offerwall.models.Reward .. .. OfferWallListener offerWallListener = new OfferWallListener() { @Override public void onOfferWallShowed() { Log.d(TAG, "Offer wall showed."); } @Override public void onOfferWallClosed() { Log.d(TAG, "Offer wall closed."); } @Override public void onRewardClaimed(@NonNull Reward reward) { Log.d(TAG, "Offer wall reward claimed."); } @Override public void onFailed(@NonNull String message) { Log.d(TAG, "onFailed: " + message); } }; Copy import com.pubscale.sdkone.offerwall.OfferWall import com.pubscale.sdkone.offerwall.models.OfferWallListener .. .. OfferWall.launch(context, offerWallListener) Copy import com.pubscale.sdkone.offerwall.OfferWall import com.pubscale.sdkone.offerwall.models.OfferWallListener .. .. OfferWall.launch(context, offerWallListener); --- # Unity | Offerwall SDK circle-exclamation **Before you start** To set up the PubScale Offerwall, you’ll need to add your app to our platform. Follow this guide for instructions on [how to set up your app](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/setting-up-your-app) . Once completed, you will receive a unique 8-digit app ID. [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/unity#preintegration-checks) [✅ arrow-up-right](https://www.alt-codes.net/check-mark-symbols.php) Preintegration checks -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- * Make sure you are using Unity version 2019.4.0f1 or above * Ensure your application builds without any errors before adding the plugin. * Android platform is selected for your Unity project. * The Editor must support Android Gradle version 4.0.1 or above. [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/unity#id-1.-add-the-offerwall-unity-plugin-to-your-unity-project) **1\. Add the OfferWall Unity plugin to your Unity project** --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [Downloadarrow-up-right](https://github.com/GreedyGame/unity-offer_wall_plugin/releases/latest) and import the latest version of OfferWall Unity Plugin from GitHub. [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/unity#id-2.-configuring-publishing-settings) **2\. Configuring Publishing Settings** --------------------------------------------------------------------------------------------------------------------------------------------------------------- * Set the minimum API level to 24 or above and the target API level to 33 or above under Edit/ProjectSettings/Player/Other Settings * Make sure you check the below-mentioned checkboxes under Edit/ProjectSettings/Player/Publishing Settings. * **Custom Main Manifest** * **Custom Main Gradle Template** * **Custom Gradle Settings Template** ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fx0ylFv11SuG05Xj0pGLn%2Fblobs%2Fc6755ygeGSEINb02qqBB%2FScreenshot%25202024-05-09%2520at%25201.06.50%25E2%2580%25AFPM.png&width=768&dpr=3&quality=100&sign=1ec78d25&sv=2) Player > Publishing settings [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/unity#id-3.-configuring-dependencies) **3\. Configuring dependencies** ------------------------------------------------------------------------------------------------------------------------------------------------- Adding `mavenCentral()` as a repository in `settingsTemplate.gradle` Add the below line inside the dependencies block in your mainTemplate.gradle file [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/unity#id-4.-force-resolve-dependencies) **4\. Force resolve dependencies** ----------------------------------------------------------------------------------------------------------------------------------------------------- **Force resolve** forces the Package Manager to resolve the project’s packages, reinstalling any altered or missing package and removing extraneous packages. To Force resolve the dependencies, Goto Assets > External Dependency Manager > Android Resolver > Force Resolve (if the resolver did not open automatically) ![](https://pubscale.gitbook.io/~gitbook/image?url=https%3A%2F%2F3371507213-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FaUVG0uxfukyc5xCdlEhZ%252Fuploads%252FUzYUObvgE35BpwNoljLm%252Fimage.png%3Falt%3Dmedia%26token%3Dbd15261f-4718-4073-ae62-8839fe558896&width=768&dpr=4&quality=100&sign=c95a673969eca060eea708c9fdc31002608f810ed2f72bebef304fa7c837926b) Assets > External Dependency Manager > Android Resolver > Force Resolve circle-info OfferWall does not work in the Editor. Please use a real device to test the integration. [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/unity#id-1.-configuring-prefabs) 5\. Configuring Prefabs ----------------------------------------------------------------------------------------------------------------------------------- #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/unity#drag-and-drop-pubscaleofferwallobject-prefab) **Drag and Drop** PubScaleOfferwallObject **prefab** Drag and drop the **PubScaleOfferwallObject prefab** from Assets/OfferWall/Prefab/PubScaleOfferwallObject.prefab in the scene. [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/unity#id-2.-configuring-app-key) 6\. Configuring App Key ----------------------------------------------------------------------------------------------------------------------------------- Enter your PubScale app ID inside the "Pubscale App ID" field located on the PubScaleOfferwallObject. ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fx0ylFv11SuG05Xj0pGLn%2Fblobs%2FwXKwHwjjxnFJ1aVU0btm%2FScreenshot%25202024-05-09%2520at%25202.05.03%25E2%2580%25AFPM.png&width=768&dpr=3&quality=100&sign=119303b2&sv=2) Offerwall Prefab circle-info The PubScale App ID is an 8-digit identifier generated during the app creation process within the dashboard. If you need help creating an account/app with us, [click here](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/setting-up-your-app) . [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/unity#id-2.-configuring-app-key-1) 7\. Initialize the SDK ------------------------------------------------------------------------------------------------------------------------------------ To launch the OfferWall, call the PubScaleOfferwallClient.Initialize(string userId) function using the instance from PubScaleOfferwallObject prefab. circle-info Expected params: 1. userID: A string value that is used to identify the user uniquely in your application. If this value is null, the SDK would internally create a userId for the device. [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/unity#id-2.-configuring-app-key-2) 8\. Custom loader background image and foreground image --------------------------------------------------------------------------------------------------------------------------------------------------------------------- ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fx0ylFv11SuG05Xj0pGLn%2Fblobs%2FIjOqaG6yfsVp2ELfDOuX%2FGroup%252078600.png&width=768&dpr=3&quality=100&sign=94c5d9a3&sv=2) #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/unity#step-1-custom-loader-background-and-loader-foreground) **Step 1: Custom loader background and loader foreground** To use custom background and foreground images for the loading screen replace the **demo\_background\_img and demo\_foreground\_img** file located under Assets/OfferWall/Resources with the image you need. #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/unity#step-2-enable-read-and-write-under-advance-image-settings) **Step 2: Enable Read and Write under Advance Image settings** Press the preset button on your imported image and then select the OfferWallTextureImporter preset from the menu and click apply. circle-info If the fields are left empty, the default values will be used: * Background: Black image * Foreground: App icon [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/unity#id-2.-configuring-app-key-3) 9\. Set Offerwall Orientation ------------------------------------------------------------------------------------------------------------------------------------------- By default, the Offerwall opens in Portrait orientation. If you want to change this behaviour, do the following changes. Add the below line inside the tag in your AndroidManifest.xml file. [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/unity#id-2.-configuring-app-key-4) 10\. Handling the SDK callbacks (optional) -------------------------------------------------------------------------------------------------------------------------------------------------------- To handle the SDK callbacks, subscribe to the events that are made available by the SimpleIntegration script. [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/unity#id-2.-configuring-app-key-5) 11\. Launch the OfferWall --------------------------------------------------------------------------------------------------------------------------------------- To launch the OfferWall, call the AdvancedIntegration.ShowOfferWall() function using the PubScaleOfferwallAdvanced prefab. Can also be used in onClick of a button: ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fx0ylFv11SuG05Xj0pGLn%2Fblobs%2F66dd1yeG5dgShyYthB12%2FScreenshot%25202024-05-09%2520at%25202.09.42%25E2%2580%25AFPM.png&width=768&dpr=3&quality=100&sign=ed9a457&sv=2) Example usage: Launching Offerwall on click of a button [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/unity#id-3.-test-the-offerwall) 11\. Setup S2S callbacks ----------------------------------------------------------------------------------------------------------------------------------- Setup the S2S callbacks to get instant updates whenever the user gets the reward. You can use this callback to reward the user in your application. [Learn more.](https://pubscale.gitbook.io/offerwall-sdk/server-to-server-s2s-callback-configuration) [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/unity#id-3.-test-the-offerwall-1) 12\. Test the OfferWall ------------------------------------------------------------------------------------------------------------------------------------ circle-info Please use the sandbox environment for testing purposes to get instant callbacks and rewards. To learn how to enable the Sandbox environment, [click here](https://pubscale.gitbook.io/offerwall-sdk/sandbox-environment/sandbox-environment) . Finally, To test the offerwall, build the application to an actual device. Check if you can launch the Offerwall and get the appropriate callbacks. [PreviousFlutterchevron-left](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/flutter) [NextWebchevron-right](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/web) Last updated 9 months ago * [✅ Preintegration checks](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/unity#preintegration-checks) * [1\. Add the OfferWall Unity plugin to your Unity project](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/unity#id-1.-add-the-offerwall-unity-plugin-to-your-unity-project) * [2\. Configuring Publishing Settings](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/unity#id-2.-configuring-publishing-settings) * [3\. Configuring dependencies](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/unity#id-3.-configuring-dependencies) * [4\. Force resolve dependencies](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/unity#id-4.-force-resolve-dependencies) * [5\. Configuring Prefabs](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/unity#id-1.-configuring-prefabs) * [6\. Configuring App Key](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/unity#id-2.-configuring-app-key) * [7\. Initialize the SDK](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/unity#id-2.-configuring-app-key-1) * [8\. Custom loader background image and foreground image](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/unity#id-2.-configuring-app-key-2) * [9\. Set Offerwall Orientation](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/unity#id-2.-configuring-app-key-3) * [10\. Handling the SDK callbacks (optional)](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/unity#id-2.-configuring-app-key-4) * [11\. Launch the OfferWall](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/unity#id-2.-configuring-app-key-5) * [11\. Setup S2S callbacks](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/unity#id-3.-test-the-offerwall) * [12\. Test the OfferWall](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/unity#id-3.-test-the-offerwall-1) sun-brightdesktopmoon Copy pluginManagement { repositories { **ARTIFACTORYREPOSITORY** gradlePluginPortal() google() } } include ':launcher', ':unityLibrary' **INCLUDES** dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS) repositories { **ARTIFACTORYREPOSITORY** google() mavenCentral() //<----------------Add this line flatDir { dirs "${project(':unityLibrary').projectDir}/libs" } } } Copy implementation 'com.pubscale.sdkone:offerwall:1.0.11' Copy PubScaleOfferwallClient myScriptInstance = GetComponent(); // Check if the script instance is not null if (myScriptInstance != null) { myScriptInstance.InitOfferWall(userId); } Copy Copy //Define functions that would be called when the callbacks are given void OnSDKInitSuccess() { } void OnSDKInitFailed(string message) { } void OnOfferwallShowed() { } void OnOfferwallClosed() { } void OnRewardClaimed(Reward reward) { } void OnOfferwallFailed(string message) { } //Subscribe to the events PubScaleOfferwallClient.OnSDKInitSuccess += OnSDKInitSuccess; PubScaleOfferwallClient.OnSDKInitFailed += OnSDKInitFailed; PubScaleOfferwallClient.OnOfferwallShowed += OnOfferwallShowed; PubScaleOfferwallClient.OnOfferwallClosed += OnOfferwallClosed; PubScaleOfferwallClient.OnRewardClaimed += OnRewardClaimed; PubScaleOfferwallClient.OnOfferwallFailed += OnOfferwallFailed; Copy PubScaleOfferwallClient myScriptInstance = GetComponent(); // Check if the script instance is not null if (myScriptInstance != null) { myScriptInstance.ShowOfferWall(); } sun-brightdesktopmoon --- # Start the OfferWall | 1.0.7 | Offerwall SDK To start the offerwall, just call, `PubscaleOfferwall.launch()` method. Copy PubscaleOfferwall.launch(() => { console.log("close"); //onClose }, (errMsg) => { console.log(errMsg); //onFailure }); [PreviousInitialize the SDKchevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/react-native/initialize-the-sdk) [NextAdding the dependencieschevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/flutter/adding-the-dependencies) Last updated 1 year ago --- # IFrame integration | 1.0.7 | Offerwall SDK ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/web/iframe-integration#to-integrate-pubscale-web-offerwall-on-your-website-you-will-need-to-place-an-iframe-in-the-html) To integrate PubScale Web offerwall on your website, you will need to place an iframe in the HTML. Copy [PreviousIntegrationchevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/unity/integration) [NextDirect Linkchevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/web/direct-link) Last updated 1 year ago --- # FAQs | 1.0.10 | Offerwall SDK chevron-rightHow do I create an PubScale Offerwall Placement/How do I get Offerwall App ID?[hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/faqs#how-do-i-create-an-pubscale-offerwall-placement-how-do-i-get-offerwall-app-id) Refer to the content below. [Setting up your app](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/setting-up-your-app) chevron-rightHow do I show my currency icon on the PubScale Offerwall?[hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/faqs#how-do-i-show-my-currency-icon-on-the-pubscale-offerwall) While setting up the offerwall, you can add an icon for your currency. This icon can also be uploaded later on the app details page after creating the offerwall. chevron-rightHow do I test the Offerwall Integration?[hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/faqs#how-do-i-test-the-offerwall-integration) To test the integration, you can make use of the [sandbox environment](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/sandbox-environment/sandbox-environment) . Sandbox environment will have test offers which are very easy to complete. Upon completion of these offers you will receive S2S postbacks on the configured Sandbox S2S URL. chevron-rightHow to reach to the PubScale team?[hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/faqs#how-to-reach-to-the-pubscale-team) Email us at [info@pubscale.comenvelope](mailto:info@pubscale.com) chevron-rightHow to get approval for web integration?[hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/faqs#how-to-get-approval-for-web-integration) Contact to your Account Manager or email us at [info@pubscale.comenvelope](mailto:info@pubscale.com) [PreviousSampleschevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/samples) sun-brightdesktopmoon sun-brightdesktopmoon --- # Samples | 1.0.10 | Offerwall SDK 1. [Sample integration - GitRepo - Kotlinarrow-up-right](https://github.com/GreedyGame/demo-offerwall-android) 2. [Sample apparrow-up-right](https://play.google.com/store/apps/details?id=app.quick.money.earn.joy) [PreviousSandbox Environmentchevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/sandbox-environment/sandbox-environment) [NextFAQschevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/faqs) Last updated 10 months ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Web | Offerwall SDK [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/web#id-1.-integration) 1\. Integration ----------------------------------------------------------------------------------------------------------------- circle-exclamation **Before you start** To set up the PubScale Offerwall, you’ll need to add your app to our platform. Follow this guide for instructions on [how to set up your app](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/setting-up-your-app) . Once completed, you will receive a unique 8-digit app ID. ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fx0ylFv11SuG05Xj0pGLn%2Fblobs%2FqezM0kmxXdVWJkgQBBok%2FWow_flow%2520%281%29.png&width=768&dpr=3&quality=100&sign=2a4dde4a&sv=2)![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fx0ylFv11SuG05Xj0pGLn%2Fblobs%2FluDiQcm4sdLejDTuGlzU%2Fwow_flow_dark.png&width=768&dpr=3&quality=100&sign=ef70fe3f&sv=2) To integrate the PubScale Offerwall, you need to provide a set of mandatory parameters for proper configuration. **Parameters** Parameters Description **app\_id** (Required) This is the unique identifier for your app, required for integration. **user\_id** (Required) A unique identifier for each user, required to track their activity on the offerwall. We recommend using a UUID as the user\_id. **idfa** (Optional) For iOS integrations Include the **idfa** as a parameter when launching the Web Offerwall. This helps enhance tracking accuracy and plays a key role in fraud prevention. **ga\_id** (Optional) For Android integrations Include the **ga\_id** as a parameter when launching the Web Offerwall. This helps enhance tracking accuracy and plays a key role in fraud prevention. To integrate the PubScale Web Offerwall into your website, you have the following options: ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/web#id-1.1.-using-an-iframe) **1.1. Using an iframe**: Place the following iframe in your HTML: ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/web#id-1.2.-using-a-direct-link) **1.2. Using a Direct Link**: Create a direct link to the PubScale Offerwall using an anchor tag. It is recommended to use an image or button for better user experience: ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/web#id-1.3.-using-javascript) **1.3. Using JavaScript:** Open the offerwall link programmatically using `window.open`. This provides flexibility for custom implementations. [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/web#id-3.-test-the-offerwall) 2\. Setup Server-to-Server(S2S) callbacks -------------------------------------------------------------------------------------------------------------------------------------------------- Set up the Server-to-Server (S2S) callbacks to receive instant updates whenever a user completes an offer and earns a reward. When an offer is completed, our server will send a notification to the configured callback URL. This callback provides the necessary information to process and verify the reward for the user in your application. [Learn more.](https://pubscale.gitbook.io/offerwall-sdk/server-to-server-s2s-callback-configuration) [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/web#id-3.-test-the-offerwall-1) 3\. Test the OfferWall --------------------------------------------------------------------------------------------------------------------------------- circle-info Please use the sandbox environment for testing purposes to get instant callbacks and rewards. To learn how to enable the Sandbox environment, [click here](https://pubscale.gitbook.io/offerwall-sdk/sandbox-environment/sandbox-environment) . To ensure your OfferWall integration is working perfectly, follow these steps during the testing phase. * Open the web offerwall and verify that all offers are displayed correctly. * Complete an offer and confirm that a callback is received from PubScale server to your server. For the sandbox environment, ensure the callback URL is configured properly to receive sandbox callbacks. * Ensure the hashing technique used matches the one specified in the documentation. * Verify that the reward value received matches the value displayed for the offer. * Confirm that the callback is received only from PubScale's [whitelisted server IPs](https://pubscale.gitbook.io/offerwall-sdk/s2s-callback-configuration/ip-whitelist) . circle-exclamation While you can use the Web Offerwall in an Android app through a WebView or Custom Chrome Tabs, we have observed better performance and fewer chargebacks when using PubScale's dedicated SDKs. PubScale provides dedicated SDKs for [Android](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/android-integration) , [React Native](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/react-native) , and [Unity](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/unity) , which offer more secure and efficient integration methods. Please consider using these SDKs for better integration. [PreviousUnitychevron-left](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/unity) [NextiOSchevron-right](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/ios) * [1\. Integration](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/web#id-1.-integration) * [1.1. Using an iframe:](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/web#id-1.1.-using-an-iframe) * [1.2. Using a Direct Link:](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/web#id-1.2.-using-a-direct-link) * [1.3. Using JavaScript:](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/web#id-1.3.-using-javascript) * [2\. Setup Server-to-Server(S2S) callbacks](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/web#id-3.-test-the-offerwall) * [3\. Test the OfferWall](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/web#id-3.-test-the-offerwall-1) sun-brightdesktopmoon Copy Copy PubScale Offerwall Copy const appId = "your_app_id"; // Replace with your app ID const userId = "your_user_id"; // Replace with your unique user ID const offerwallUrl = `https://wow.pubscale.com?app_id=${appId}&user_id=${userId}`; window.open(offerwallUrl, '_blank'); sun-brightdesktopmoon --- # Initialize the SDK | 1.0.6-beta1 | Offerwall SDK You must initialize the SDK before using the SDK. To do this, call `Offerwall.init(OfferWallConfig, OfferWallInitListener)` . Parameters for init call: * **OfferWallConfig offerWallConfig:** An object to pass configuration-related info to the SDK while initializing. Refer below for how to create an object of OfferWallConfig. * **OfferWallInitListener offerWallInitListener:** A listener that informs you if the SDK initialization was successful or not. In case of failure, it will also give you a string stating the cause of the failure. This parameter is optional. ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1/native-android/initialize-the-sdk#creating-offerwallconfig-object) **Creating OfferWallConfig object:** Create an instance of OfferWallConfig using the builder class OfferWallConfig.Builder by passing the context and your PubScale app ID. circle-info Use sandbox environment app ID for testing purposes. [Sandbox Environment](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1/sandbox-environment/sandbox-environment) - Learn how to setup Sandbox environment Kotlin Java Copy import com.pubscale.sdkone.offerwall.OfferWallConfig .. .. val offerWallConfig = OfferWallConfig.Builder(context, "YOUR_PUBSCALE_APP_ID") .setUniqueId("unique_id") //optional, used to represent the user of your application .setLoaderBackgroundBitmap(backgroundBitmap) //optional .setLoaderForegroundBitmap(foreground) //optional .setFullscreenEnabled(false) //optional .build() Copy import com.pubscale.sdkone.offerwall.OfferWallConfig .. .. OfferWallConfig offerWallConfig = new OfferWallConfig.Builder(context, "YOUR_PUBSCALE_APP_ID") .setUniqueId("unique_id") //optional, used to represent the user of your application .setLoaderBackgroundBitmap(backgroundBitmap)//optional .setLoaderForegroundBitmap(foregroundBitmap)//optional .setFullscreenEnabled(false)//optional .build(); These are the public methods available for OfferWallConfig.Builder class: Public Methods Description setUniqueId(String uniqueId) Sets a unique id that will be used to identify the user uniquely. This will be sent back in the postback. setFullscreenEnabled(Boolean isEnabled) Sets if the offerwall should open in fullscreen mode or not. Default: false setLoaderBackgroundBitmap(Bitmap bitmap) Accepts a bitmap and uses it as the background image for the loader and offerwall top banner. Default: Black color image setLoaderForegroundBitmap(Bitmap bitmap) Accepts a bitmap and uses it as the foreground image for the loader and offerwall top banner. Default: App icon build() Builds the config and returns OfferWallConfig instance triangle-exclamation If a unique ID is not set, rewarding the user is not guaranteed. ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1/native-android/initialize-the-sdk#undefined-1) ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1/native-android/initialize-the-sdk#initialize-the-offerwall-sdk) **Initialize the Offerwall SDK:** Initialize the OfferWall SDK by calling the init function by passing the offer wall config. Kotlin Java circle-info OfferWallInitListener is an optional parameter in init() method. circle-info If you need to change any config after initializing the SDK, you should destroy and re-init the SDK. To destroy, call `OfferWall.destroy()` [PreviousSetting up the SDKchevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1/native-android/setting-up-the-sdk) [NextStart the OfferWallchevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1/native-android/start-the-offerwall) Last updated 2 years ago * [Creating OfferWallConfig object:](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1/native-android/initialize-the-sdk#creating-offerwallconfig-object) * [](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1/native-android/initialize-the-sdk#undefined-1) * [Initialize the Offerwall SDK:](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1/native-android/initialize-the-sdk#initialize-the-offerwall-sdk) Copy OfferWall.init(offerWallConfig, object : OfferWallInitListener { override fun onInitSuccess() { } override fun onInitFailed(error: InitError) { } }) Copy OfferWall.init(offerWallConfig, new OfferWallInitListener() { @Override public void onInitSuccess() { } @Override public void onInitFailed(@NonNull InitError error) { } }); --- # S2S Callback Configuration | 1.0.7 | Offerwall SDK You can configure the S2S callback for the offerwall in the dashboard inside the Offerwall's overview section. ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/s2s-callback-configuration/s2s-callback-configuration#id-1.-setup-callback-url) 1\. Setup Callback URL When a user has earned a reward by completing an offer, we fire an HTTP GET request to the provided callback URL. The following query parameters will be part of the request. Copy ?user_id=&value=&token=&signature= //Example http://www.example.com/payments/offers/pubscale?user_id=&value=&token=&signature= Query Params Description user\_id The 'unique\_id' set while initializing the SDK. value The decimal value of the reward earned by the user. token A token that uniquely represents the transaction. signature Hash of the above values to verify the request (more info below). ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/s2s-callback-configuration/s2s-callback-configuration#id-2.-server-response) 2\. Server Response Responding to the callback URL with status codes between and including the values 200 to 299 will mark the callback as successfully delivered. In the event of the server not responding with any of the aforementioned status codes, the request will be **retried 6 times** at different intervals. You can utilize the unique token sent in the request to avoid rewarding the user multiple times for the same callback. ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/s2s-callback-configuration/s2s-callback-configuration#id-3.-optional-parameters-for-fraud-detection-prevention) 3\. Optional Parameters for fraud detection/prevention The value sent in the signature parameter can be used to validate the identity of the origin of the request. The value is an MD5 hash of the template below. The secret key is an additional key that will be provided along with the APP API KEY. Golang NodeJs Python PHP #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/s2s-callback-configuration/s2s-callback-configuration#example) Example secret\_key = `fa072672-d432-11c4-885a-EB1CdEc4Bb13` user\_id = `30356439-8d15-4f47-B133-010a37C19eBD` value = `100.1234` token = `525a5B8e-512b-441A-a10B-72d218c370e5` Final format = `fa072672-d432-11c4-885a-EB1CdEc4Bb13.30356439-8d15-4f47-B133-010a37C19eBD.100.525a5B8e-512b-441A-a10B-72d218c370e5` #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/s2s-callback-configuration/s2s-callback-configuration#steps-to-validate-the-value-of-the-hash) Steps to validate the value of the hash 1. Concatenate the values in the above format. 2. Make sure to convert the value parameter from decimal to integer. 3. Calculate the MD5 hash of the concatenated value. 4. Build Hex encode of the generated value. 5. Verify if the calculated value is equal to the value sent in the signature parameter. circle-info As the value of the secret key will only be known to you and PubScale’s server, the hash cannot be generated by a fraudulent third party. [PreviousDirect Linkchevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/web/direct-link) [NextIP Whitelistchevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/s2s-callback-configuration/ip-whitelist) Last updated 1 year ago * [1\. Setup Callback URL](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/s2s-callback-configuration/s2s-callback-configuration#id-1.-setup-callback-url) * [2\. Server Response](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/s2s-callback-configuration/s2s-callback-configuration#id-2.-server-response) * [3\. Optional Parameters for fraud detection/prevention](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/s2s-callback-configuration/s2s-callback-configuration#id-3.-optional-parameters-for-fraud-detection-prevention) Copy template := fmt.Sprintf("%s.%s.%d.%s", , , ), ) hash := toMD5(template) if hash != {signature} { return errors.New("invalid signature") } func toMD5(text string) string { algorithm := md5.New() algorithm.Write([]byte(text)) return hex.EncodeToString(algorithm.Sum(nil)) } Copy const md5 = require('md5') const template = `${}.${}.${Math.trunc()}.${}` const hash = md5(template) if(signature != hash) { return false } Copy import hashlib template = '{secret_key}.{user_id}.{value}.{token}'.format(secret_key=,user_id=,value=int(),token=) hash = hashlib.md5(template.encode('utf-8')).hexdigest() if hash != : return false Copy function calculateHash() { $user = $_GET['user_id']; $token = $_GET['token']; $value = $_GET['value']; $template = . "." . $user . "." . (int)$value . "." $token; return calculateMD5($template); } function calculateMD5($data) { return hash('md5', $data); } $hash = $_GET['signature']; if ($hash != calculateHash()) { return false } --- # Integration | 1.0.7 | Offerwall SDK circle-info OfferWall does not work in the Editor. Please use a real device to test the integration. ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/unity/integration#id-1.-configuring-prefabs) 1\. Configuring Prefabs #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/unity/integration#drag-and-drop-pubscaleofferwallobject-prefab) **Drag and Drop** PubScaleOfferwallObject **prefab** Drag and drop the **PubScaleOfferwallObject prefab** from Assets/OfferWall/Prefab/PubScaleOfferwallObject.prefab in the scene. ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/unity/integration#id-2.-configuring-app-key) 2\. Configuring App Key Enter your PubScale app ID inside the "Pubscale App ID" field located on the PubScaleOfferwallObject. ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2F2425324002-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fhi3J82Irfk38cjMHFvTF%252Fuploads%252FlhwkZyv4yxbXtpiHiR8R%252FScreenshot%25202024-05-09%2520at%25202.05.03%25E2%2580%25AFPM.png%3Falt%3Dmedia%26token%3D840846e7-80a8-4a03-9aad-e55e9b9db68f&width=768&dpr=3&quality=100&sign=a31b9aba&sv=2) Offerwall Prefab circle-info The PubScale App ID is an 8-digit identifier generated during the app creation process within the dashboard. If you need help creating an account/app with us, [click here](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/prerequisites/pubscale-onboarding) . ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/unity/integration#id-2.-configuring-app-key-1) 3\. Initialize the SDK To launch the OfferWall, call the PubScaleOfferwallClient.Initialize(string userId) function using the instance from PubScaleOfferwallObject prefab. circle-info Expected params: 1. userID: A string value that is used to identify the user uniquely in your application. If this value is null, the SDK would internally create a userId for the device. ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/unity/integration#id-2.-configuring-app-key-2) 4\. Custom loader background image and foreground image ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2F2425324002-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fhi3J82Irfk38cjMHFvTF%252Fuploads%252FF3IN4OMNQRPGZ3Xisjqa%252FGroup%252078600.png%3Falt%3Dmedia%26token%3D677fa7df-43db-41d5-865b-9f4a0d0ae238&width=768&dpr=3&quality=100&sign=2ae2c461&sv=2) #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/unity/integration#step-1-custom-loader-background-and-loader-foreground) **Step 1: Custom loader background and loader foreground** To use custom background and foreground images for the loading screen replace the **demo\_background\_img and demo\_foreground\_img** file located under Assets/OfferWall/Resources with the image you need. #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/unity/integration#step-2-enable-read-and-write-under-advance-image-settings) **Step 2: Enable Read and Write under Advance Image settings** Press the preset button on your imported image and then select the OfferWallTextureImporter preset from the menu and click apply. circle-info If the fields are left empty, the default values will be used: * Background: Black image * Foreground: App icon ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/unity/integration#id-2.-configuring-app-key-3) 5\. Set Offerwall Orientation By default, the Offerwall opens in Portrait orientation. If you want to change this behaviour, do the following changes. Add the below line inside the tag in your AndroidManifest.xml file. ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/unity/integration#id-2.-configuring-app-key-4) 6\. Handling the SDK callbacks (optional) To handle the SDK callbacks, subscribe to the events that are made available by the SimpleIntegration script. ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/unity/integration#id-2.-configuring-app-key-5) 7\. Launch the OfferWall To launch the OfferWall, call the AdvancedIntegration.ShowOfferWall() function using the PubScaleOfferwallAdvanced prefab. Can also be used in onClick of a button: ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2F2425324002-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fhi3J82Irfk38cjMHFvTF%252Fuploads%252FBkgMzr5FYDEE8GeLgeha%252FScreenshot%25202024-05-09%2520at%25202.09.42%25E2%2580%25AFPM.png%3Falt%3Dmedia%26token%3Da37716ed-c61d-4c22-8352-1312fac39a1e&width=768&dpr=3&quality=100&sign=54d6fa9e&sv=2) Example usage: Launching Offerwall on click of a button ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/unity/integration#id-3.-test-the-offerwall) 8\. Test the OfferWall circle-info Please use the sandbox environment for testing purposes to get instant callbacks and rewards. To learn how to enable the Sandbox environment, [click here](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/sandbox-environment/sandbox-environment) . Finally, To test the offer wall, build the application to an actual device. Check if you can launch the Offerwall and get the appropriate callbacks. [PreviousSetting up the SDKchevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/unity/setting-up-the-sdk) [NextIFrame integrationchevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/web/iframe-integration) Last updated 1 year ago * [1\. Configuring Prefabs](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/unity/integration#id-1.-configuring-prefabs) * [2\. Configuring App Key](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/unity/integration#id-2.-configuring-app-key) * [3\. Initialize the SDK](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/unity/integration#id-2.-configuring-app-key-1) * [4\. Custom loader background image and foreground image](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/unity/integration#id-2.-configuring-app-key-2) * [5\. Set Offerwall Orientation](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/unity/integration#id-2.-configuring-app-key-3) * [6\. Handling the SDK callbacks (optional)](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/unity/integration#id-2.-configuring-app-key-4) * [7\. Launch the OfferWall](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/unity/integration#id-2.-configuring-app-key-5) * [8\. Test the OfferWall](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/unity/integration#id-3.-test-the-offerwall) Copy PubScaleOfferwallClient myScriptInstance = GetComponent(); // Check if the script instance is not null if (myScriptInstance != null) { myScriptInstance.InitOfferWall(userId); } Copy Copy //Define functions that would be called when the callbacks are given void OnSDKInitSuccess() { } void OnSDKInitFailed(string message) { } void OnOfferwallShowed() { } void OnOfferwallClosed() { } void OnRewardClaimed(Reward reward) { } void OnOfferwallFailed(string message) { } //Subscribe to the events PubScaleOfferwallClient.OnSDKInitSuccess += OnSDKInitSuccess; PubScaleOfferwallClient.OnSDKInitFailed += OnSDKInitFailed; PubScaleOfferwallClient.OnOfferwallShowed += OnOfferwallShowed; PubScaleOfferwallClient.OnOfferwallClosed += OnOfferwallClosed; PubScaleOfferwallClient.OnRewardClaimed += OnRewardClaimed; PubScaleOfferwallClient.OnOfferwallFailed += OnOfferwallFailed; Copy PubScaleOfferwallClient myScriptInstance = GetComponent(); // Check if the script instance is not null if (myScriptInstance != null) { myScriptInstance.ShowOfferWall(); } --- # Start the OfferWall | 1.0.6-beta1 | Offerwall SDK To start the offerwall, just call, `PubscaleOfferwall.launch()` method. Copy PubscaleOfferwall.launch(() => { console.log("close"); //onClose }, (errMsg) => { console.log(errMsg); //onFailure }); [PreviousInitialize the SDKchevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1/react-native/initialize-the-sdk) [NextS2S Callback Configurationchevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1/s2s-callback-configuration/s2s-callback-configuration) --- # Welcome to PubScale Offerwall SDK | 1.0.10 | Offerwall SDK ![Page cover](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2FwtFu5cQcg9ZXDSngP2aN%2Fblobs%2F1FwlfQTU4NySYZsBbL5m%2FGitbook%2520Offerwall.png&width=1248&dpr=3&quality=100&sign=e74458ff&sv=2) [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10#overview) Overview ---------------------------------------------------------------------------------- The PubScale Offerwall SDK is an app monetization tool that allows developers to make incremental revenue by asking the user to complete some task in exchange for in-app currency. [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10#benefits) Benefits ---------------------------------------------------------------------------------- 1. Incremental revenue 2. Monetize non-paying users 3. Improves user retention [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10#features) Features ---------------------------------------------------------------------------------- 1. **Instant reward offers:** You get offers that give out instant rewards on completion. 2. **Fraud prevention:** Our inbuilt fraud detection and prevention system ensures that all the conversions that happen from the app are legit. 3. **Easy integration:** The SDK provides a straightforward integration process, and can be done within a few hours. [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10#quick-links) Quick links ---------------------------------------------------------------------------------------- 1. [PubScale dashboardarrow-up-right](https://dashboard.pubscale.com/) 2. [Sample app and code](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/samples) [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10#get-started) Get Started ---------------------------------------------------------------------------------------- We've put together some helpful guides for you to get set up with our SDK quickly and easily. ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10#supported-platforms) Supported Platforms [androidAndroid Integrationchevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/android-integration) [reactReact Nativechevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/react-native) [unityUnitychevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/unity) [browserWebchevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/web) [appleiOSchevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/ios) ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10#reward-verification) Reward Verification [🦉Server-to-Server (S2S) Callback Configurationchevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/server-to-server-s2s-callback-configuration) [NextSetting up your appchevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/setting-up-your-app) Last updated 11 months ago * [Overview](https://pubscale.gitbook.io/offerwall-sdk/1.0.10#overview) * [Benefits](https://pubscale.gitbook.io/offerwall-sdk/1.0.10#benefits) * [Features](https://pubscale.gitbook.io/offerwall-sdk/1.0.10#features) * [Quick links](https://pubscale.gitbook.io/offerwall-sdk/1.0.10#quick-links) * [Get Started](https://pubscale.gitbook.io/offerwall-sdk/1.0.10#get-started) * [Supported Platforms](https://pubscale.gitbook.io/offerwall-sdk/1.0.10#supported-platforms) * [Reward Verification](https://pubscale.gitbook.io/offerwall-sdk/1.0.10#reward-verification) sun-brightdesktopmoon sun-brightdesktopmoon --- # Sandbox Environment | Offerwall SDK The Sandbox environment allows you to fully test the integration before releasing your app to production. You can simulate the complete workflow from SDK initialization to receiving callbacks without affecting the live environment. circle-info Your app does not need to be live or published to use the Sandbox environment. * * * [hashtag](https://pubscale.gitbook.io/offerwall-sdk/sandbox-environment/sandbox-environment#launch-sandbox) Launch SandBox ------------------------------------------------------------------------------------------------------------------------------- ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2F95496035-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fx0ylFv11SuG05Xj0pGLn%252Fuploads%252FwrZvgCeUlDm78zCmrR8m%252FScreenshot%25202025-06-16%2520at%25206.10.05%25E2%2580%25AFPM.png%3Falt%3Dmedia%26token%3D4aa3c5fd-20f9-414f-977e-0efe3e7e074e&width=768&dpr=3&quality=100&sign=63f845a1&sv=2) Launch Sandbox mode **Launch the Sandbox**: Click **Launch Sandbox** to begin testing your integration. ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2F95496035-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fx0ylFv11SuG05Xj0pGLn%252Fuploads%252F3Zeao4OQxzQ66GukIlNL%252FScreenshot%25202025-06-16%2520at%25206.19.39%25E2%2580%25AFPM.png%3Falt%3Dmedia%26token%3Dccb42901-ea57-4fce-9a86-062e433fa173&width=768&dpr=3&quality=100&sign=25638c12&sv=2) Enter an User ID for getting logs Input a test User ID and click **Go**. ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/sandbox-environment/sandbox-environment#setting-user-id-during-sdk-initialization) Setting User ID During SDK Initialization Android Web API Call `setUniqueId("YOUR_USER_ID")` during SDK initialization. Set Unique user id by passing a query param`?user_id=YOUR_USER_ID` In the tracking link provided, Append Unique user id as query param `user_id: YOUR_USER_ID` > **Important:** The User ID you enter here must be the same as the User ID used in your SDK initialization. This ensures that all events and callbacks are properly linked and you receive the test callback for this user. * * * [hashtag](https://pubscale.gitbook.io/offerwall-sdk/sandbox-environment/sandbox-environment#enable-sandbox-mode) Enable Sandbox Mode ----------------------------------------------------------------------------------------------------------------------------------------- Android Web API Call `setSandboxEnabled(true)` during SDK initialization. Enable sandbox mode by passing a query param`?sandbox=true` Get sandbox mode offers by passing the sandbox key in the API body as `sandbox: true` * * * [hashtag](https://pubscale.gitbook.io/offerwall-sdk/sandbox-environment/sandbox-environment#system-logs) System Logs ------------------------------------------------------------------------------------------------------------------------- ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2F95496035-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fx0ylFv11SuG05Xj0pGLn%252Fuploads%252FmDBgLVhTO05bWBn3o6Ah%252FScreenshot%25202025-06-17%2520at%25202.59.04%25E2%2580%25AFPM.png%3Falt%3Dmedia%26token%3De6d34c3e-9563-41a4-8e5d-2ee6e6b2a56e&width=768&dpr=3&quality=100&sign=bcbeeccb&sv=2) System logs **Trigger Events**: Perform actions in your application. Corresponding events will be logged in the **System Logs**. circle-info Resetting the history will clear all offer progress for this user, allowing you to retest offers from the start. 💡 You can configure a **Server-to-Server (S2S) callback** to receive event data directly on your server. Check [Integeration Steps](https://pubscale.gitbook.io/offerwall-sdk/server-to-server-s2s-callback-configuration) . circle-info If you are able to see all expected events in the System Logs and receive callbacks correctly during your Sandbox testing, you can be confident that your integration is set up properly and ready for production. [PreviousPromotionschevron-left](https://pubscale.gitbook.io/offerwall-sdk/promotions) [NextSampleschevron-right](https://pubscale.gitbook.io/offerwall-sdk/samples) Last updated 9 months ago * [Launch SandBox](https://pubscale.gitbook.io/offerwall-sdk/sandbox-environment/sandbox-environment#launch-sandbox) * [Setting User ID During SDK Initialization](https://pubscale.gitbook.io/offerwall-sdk/sandbox-environment/sandbox-environment#setting-user-id-during-sdk-initialization) * [Enable Sandbox Mode](https://pubscale.gitbook.io/offerwall-sdk/sandbox-environment/sandbox-environment#enable-sandbox-mode) * [System Logs](https://pubscale.gitbook.io/offerwall-sdk/sandbox-environment/sandbox-environment#system-logs) sun-brightdesktopmoon sun-brightdesktopmoon --- # Setting up the SDK | 1.0.6-beta1 | Offerwall SDK #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1/native-android/setting-up-the-sdk#id-1.-add-this-to-your-build.gradle-file) 1\. Add this to your build.gradle file Add the below line inside the **dependencies** block in your build.gradle file Kotlin Script Groovy Copy implementation('com.pubscale.sdkone:offerwall:1.0.6-beta1') Copy implementation 'com.pubscale.sdkone:offerwall:1.0.6-beta1' #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1/native-android/setting-up-the-sdk#id-2.-clean-build-and-rebuild-the-project) 2\. Clean build and Rebuild the project #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1/native-android/setting-up-the-sdk#id-3.-configure-proguard-rules) 3\. Configure proguard rules For the SDK to work properly in release(obfuscated/minified) builds, add the following rules in your proguard-rules.pro file. proguard-rules.pro Copy -keep class com.pubscale.sdkone.offerwall.** {*;} #Supporting R8 full mode -keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation -keep,allowobfuscation,allowshrinking interface retrofit2.Call -keep,allowobfuscation,allowshrinking class retrofit2.Response We have added the SDK to the project. Learn how to initialize the SDK in the next step [PreviousPubScale Onboardingchevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1/prerequisites/pubscale-onboarding) [NextInitialize the SDKchevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1/native-android/initialize-the-sdk) Last updated 2 years ago --- # Server-to-Server (S2S) Callback Configuration | Offerwall SDK Server-to-Server callbacks allow you to receive reward confirmation events directly from the offerwall via HTTP requests. Go to the Offerwall section, open the Overview tab, select your app from the list, then click the S2S Callbacks card in your app’s dashboard to create or manage S2S callbacks. Click **Configure** to get started. ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2F95496035-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fx0ylFv11SuG05Xj0pGLn%252Fuploads%252FzEQj296qHxykXUbkYIqp%252FScreenshot%25202025-06-20%2520at%25205.09.44%25E2%2580%25AFPM.png%3Falt%3Dmedia%26token%3Da8a9856a-fc29-45e5-8b64-6f272aca7670&width=768&dpr=3&quality=100&sign=d136f68c&sv=2) [hashtag](https://pubscale.gitbook.io/offerwall-sdk/server-to-server-s2s-callback-configuration#id-1.-setup-callback-url) 1\. Setup Callback URL ----------------------------------------------------------------------------------------------------------------------------------------------------- When a user completes an offer and earns a reward, an HTTP GET request is sent to your configured callback URL. The request includes a set of query parameters that convey key reward information. ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/server-to-server-s2s-callback-configuration#id-1.1.-base-url) 1.1. Base URL You must first define your **Base URL** — the endpoint on your server that will handle the incoming callback. ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2F95496035-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fx0ylFv11SuG05Xj0pGLn%252Fuploads%252F8iNeskzGNy3z3U7hyZdv%252FScreenshot%25202025-06-19%2520at%25203.25.01%25E2%2580%25AFPM.png%3Falt%3Dmedia%26token%3D2682d4c5-21f1-4841-a368-653f73092afe&width=768&dpr=3&quality=100&sign=7b9bb805&sv=2) BaseUrl and Final Callback Url circle-info For any custom URL requirements or special customizations, please contact your Account Manager. ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/server-to-server-s2s-callback-configuration#id-1.2.-parameter-configuration) 1.2. Parameter Configuration Parameters can be added using a **key-value builder** interface: * Keys are fully editable. * Values are selected from predefined **macros** (e.g., `user_id`, `value`, etc.) via a searchable dropdown. * **Static parameters** can also be added with hardcoded values. * Some **default system parameters** are pre-filled (e.g., `user_id`, `value`, `token`, `signature`) and appear in the list with locked values. ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2F95496035-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fx0ylFv11SuG05Xj0pGLn%252Fuploads%252FrJd4TIhliisUZjbJxsgI%252FScreenshot%25202025-06-19%2520at%252012.49.16%25E2%2580%25AFPM.png%3Falt%3Dmedia%26token%3D4f2b044e-3ad1-4461-984d-e9d17b2539cf&width=768&dpr=3&quality=100&sign=f3111d4e&sv=2) Callback Macros Key Values circle-info **Example callback setup:** **Callback URL set by you:** http://www.example.com/payments/offers/pubscale **Request sent from us:** HTTP GET http://www.example.com/payments/offers/pubscale?user\_id={user\_id}&value={value}&token={token}&signature={signature} Query Params Description user\_id \* The 'unique\_id' set while initializing the SDK. value \* The decimal value of the reward earned by the user. token \* A token that uniquely represents the transaction. signature \* Hash of the above values to verify the request (more info below). click\_datetime The Unix timestamp of when the user clicked the offer. Eg`1718509200` conversion\_datetime The Unix timestamp of when the user completed the offer. Eg `1718509400` country The user's country in ISO 3166-1 alpha-2 code. Example: `IN`, `US` gaid The user's Google Advertising ID (Android only). Example: `a1b2c3d4-e5f6-7890-gh12-ijkl3456mnop` goal\_name The name assigned to the reward or task. Example: `Complete 5th Level` goal\_value A unique code for the completed task. Example: `FB_Level_Complete_5` idfa Apple’s Identifier for Advertisers (iOS only). Example: `6D92078A-8246-4BA4-AE5B-76104861E7DC` ip The IP address of the user when the offer was clicked. Example: `192.168.0.101` offer\_id A unique identifier for the completed offer. Example: `45678` offer\_name The title of the completed offer. Example: `Tappy Plane - GameApp` package\_name The package name of the app associated with the offer. Example: `com.tappyplane.gameapp` payout\_usd The payout amount in USD for the completed offer. Example: `0.75` useragent The user’s browser and device information string. Example: `Mozilla/5.0 (Linux; Android 10; Pixel 3)` [hashtag](https://pubscale.gitbook.io/offerwall-sdk/server-to-server-s2s-callback-configuration#id-1.3.-server-response) 1.3. Server Response -------------------------------------------------------------------------------------------------------------------------------------------------- Responding to the callback URL with status codes between and including the values 200 to 299 will mark the callback as successfully delivered. In the event of the server not responding with any of the aforementioned status codes, the request will be **retried 6 times** at different intervals. You can utilize the unique token sent in the request to avoid rewarding the user multiple times for the same callback. ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/server-to-server-s2s-callback-configuration#id-1.4.-hash-validation) 1.4. Hash validation The value sent in the signature parameter can be used to validate the identity of the origin of the request. The value is an MD5 hash of the template below. The secret key is an additional key that will be provided along with the APP API KEY. PHP NodeJs Python Golang ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/server-to-server-s2s-callback-configuration#example) Example secret\_key = `fa072672-d432-11c4-885a-EB1CdEc4Bb13` user\_id = `30356439-8d15-4f47-B133-010a37C19eBD` value = `100.1234` token = `525a5B8e-512b-441A-a10B-72d218c370e5` Final format = `fa072672-d432-11c4-885a-EB1CdEc4Bb13.30356439-8d15-4f47-B133-010a37C19eBD.100.525a5B8e-512b-441A-a10B-72d218c370e5` ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/server-to-server-s2s-callback-configuration#steps-to-validate-the-value-of-the-hash) Steps to validate the value of the hash 1. Concatenate the values in the above format. 2. Make sure to convert the value parameter from decimal to integer. 3. Calculate the MD5 hash of the concatenated value. 4. Build Hex encode of the generated value. 5. Verify if the calculated value is equal to the value sent in the signature parameter. ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2F95496035-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fx0ylFv11SuG05Xj0pGLn%252Fuploads%252FxQrlXbH5BpGuJKbCLNP0%252FScreenshot%25202025-06-19%2520at%252012.46.13%25E2%2580%25AFPM.png%3Falt%3Dmedia%26token%3D09b360d2-df50-4939-8187-b72ad495bddf&width=768&dpr=3&quality=100&sign=94deafe8&sv=2) circle-info As the value of the secret key will only be known to you and PubScale’s server, the hash cannot be generated by a fraudulent third party. ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/server-to-server-s2s-callback-configuration#id-1.5.-ip-whitelisting) 1.5. IP Whitelisting You can restrict the callbacks to be accepted only from our sever IP address(es). Please whitelist the following IP(s) and regularly check back to find possible changes [hashtag](https://pubscale.gitbook.io/offerwall-sdk/server-to-server-s2s-callback-configuration#id-2.-test-callback-tool) 2\. Test Callback Tool ----------------------------------------------------------------------------------------------------------------------------------------------------- A dedicated modal tool is available to test your callback configuration before going live. * Safely edit and test the callback URL without impacting your saved configuration. * **Input Fields**: * **User ID**: Used to simulate a user session. * **Custom Reward Value**: Used to simulate a reward payout. * This allows for quick verification of your endpoint and debugging of parameters. circle-info The User ID you enter here must be the same as the User ID used in your SDK initialization ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2F95496035-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fx0ylFv11SuG05Xj0pGLn%252Fuploads%252FWpLrYFKQpexjeZJIU65Z%252FScreenshot%25202025-06-19%2520at%25208.09.15%25E2%2580%25AFAM.png%3Falt%3Dmedia%26token%3D15516315-d190-4365-8a2d-9744a3c57aaa&width=768&dpr=3&quality=100&sign=f4322436&sv=2) [PreviousAPIchevron-left](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/api) [NextPromotionschevron-right](https://pubscale.gitbook.io/offerwall-sdk/promotions) Last updated 2 months ago * [1\. Setup Callback URL](https://pubscale.gitbook.io/offerwall-sdk/server-to-server-s2s-callback-configuration#id-1.-setup-callback-url) * [1.1. Base URL](https://pubscale.gitbook.io/offerwall-sdk/server-to-server-s2s-callback-configuration#id-1.1.-base-url) * [1.2. Parameter Configuration](https://pubscale.gitbook.io/offerwall-sdk/server-to-server-s2s-callback-configuration#id-1.2.-parameter-configuration) * [1.3. Server Response](https://pubscale.gitbook.io/offerwall-sdk/server-to-server-s2s-callback-configuration#id-1.3.-server-response) * [1.4. Hash validation](https://pubscale.gitbook.io/offerwall-sdk/server-to-server-s2s-callback-configuration#id-1.4.-hash-validation) * [Example](https://pubscale.gitbook.io/offerwall-sdk/server-to-server-s2s-callback-configuration#example) * [Steps to validate the value of the hash](https://pubscale.gitbook.io/offerwall-sdk/server-to-server-s2s-callback-configuration#steps-to-validate-the-value-of-the-hash) * [1.5. IP Whitelisting](https://pubscale.gitbook.io/offerwall-sdk/server-to-server-s2s-callback-configuration#id-1.5.-ip-whitelisting) * [2\. Test Callback Tool](https://pubscale.gitbook.io/offerwall-sdk/server-to-server-s2s-callback-configuration#id-2.-test-callback-tool) sun-brightdesktopmoon Copy function calculateHash() { $user = $_GET['user_id']; $token = $_GET['token']; $value = $_GET['value']; $template = . "." . $user . "." . (int)$value . "." $token; return calculateMD5($template); } function calculateMD5($data) { return hash('md5', $data); } $hash = $_GET['signature']; if ($hash != calculateHash()) { return false } Copy const md5 = require('md5') const template = `${}.${}.${Math.trunc()}.${}` const hash = md5(template) if(signature != hash) { return false } Copy import hashlib template = '{secret_key}.{user_id}.{value}.{token}'.format(secret_key=,user_id=,value=int(),token=) hash = hashlib.md5(template.encode('utf-8')).hexdigest() if hash != : return false Copy template := fmt.Sprintf("%s.%s.%d.%s", , , ), ) hash := toMD5(template) if hash != {signature} { return errors.New("invalid signature") } func toMD5(text string) string { algorithm := md5.New() algorithm.Write([]byte(text)) return hex.EncodeToString(algorithm.Sum(nil)) } Copy 34.100.236.68 34.100.128.195 34.14.172.7 //Last updated at: Jan 20, 2026 sun-brightdesktopmoon --- # Server-to-Server (S2S) Callback Configuration | 1.0.9 | Offerwall SDK You can configure the S2S callback for the offerwall in the dashboard inside the Offerwall's overview section. [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/server-to-server-s2s-callback-configuration#id-1.-setup-callback-url) 1\. Setup Callback URL ----------------------------------------------------------------------------------------------------------------------------------------------------------- When a user has earned a reward by completing an offer, we fire an HTTP GET request to the provided callback URL. The following query parameters will be part of the request. circle-info **Example callback setup:** **Callback URL set by you:** http://www.example.com/payments/offers/pubscale **Request sent from us:** HTTP GET http://www.example.com/payments/offers/pubscale?user\_id=&value=&token=&signature= Copy ?user_id=&value=&token=&signature= //Example http://www.example.com/payments/offers/pubscale?user_id=&value=&token=&signature= Query Params Description user\_id The 'unique\_id' set while initializing the SDK. value The decimal value of the reward earned by the user. token A token that uniquely represents the transaction. signature Hash of the above values to verify the request (more info below). [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/server-to-server-s2s-callback-configuration#id-2.-server-response) 2\. Server Response ----------------------------------------------------------------------------------------------------------------------------------------------------- Responding to the callback URL with status codes between and including the values 200 to 299 will mark the callback as successfully delivered. In the event of the server not responding with any of the aforementioned status codes, the request will be **retried 6 times** at different intervals. You can utilize the unique token sent in the request to avoid rewarding the user multiple times for the same callback. [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/server-to-server-s2s-callback-configuration#id-3.-optional-parameters-for-fraud-detection-prevention) 3\. Optional Parameters for fraud detection/prevention --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/server-to-server-s2s-callback-configuration#id-3.1.-hash-validation) 3.1. Hash validation The value sent in the signature parameter can be used to validate the identity of the origin of the request. The value is an MD5 hash of the template below. The secret key is an additional key that will be provided along with the APP API KEY. PHP NodeJs Python Golang ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/server-to-server-s2s-callback-configuration#example) Example secret\_key = `fa072672-d432-11c4-885a-EB1CdEc4Bb13` user\_id = `30356439-8d15-4f47-B133-010a37C19eBD` value = `100.1234` token = `525a5B8e-512b-441A-a10B-72d218c370e5` Final format = `fa072672-d432-11c4-885a-EB1CdEc4Bb13.30356439-8d15-4f47-B133-010a37C19eBD.100.525a5B8e-512b-441A-a10B-72d218c370e5` ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/server-to-server-s2s-callback-configuration#steps-to-validate-the-value-of-the-hash) Steps to validate the value of the hash 1. Concatenate the values in the above format. 2. Make sure to convert the value parameter from decimal to integer. 3. Calculate the MD5 hash of the concatenated value. 4. Build Hex encode of the generated value. 5. Verify if the calculated value is equal to the value sent in the signature parameter. circle-info As the value of the secret key will only be known to you and PubScale’s server, the hash cannot be generated by a fraudulent third party. ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/server-to-server-s2s-callback-configuration#id-3.2.-ip-whitelisting) 3.2. IP Whitelisting You can restrict the callbacks to be accepted only from our sever IP address(es). Please whitelist the following IP(s) and regularly check back to find possible changes [PreviousWeb Offerwallchevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/web-offerwall) [NextSandbox Environmentchevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/sandbox-environment/sandbox-environment) Last updated 1 year ago * [1\. Setup Callback URL](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/server-to-server-s2s-callback-configuration#id-1.-setup-callback-url) * [2\. Server Response](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/server-to-server-s2s-callback-configuration#id-2.-server-response) * [3\. Optional Parameters for fraud detection/prevention](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/server-to-server-s2s-callback-configuration#id-3.-optional-parameters-for-fraud-detection-prevention) * [3.1. Hash validation](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/server-to-server-s2s-callback-configuration#id-3.1.-hash-validation) * [Example](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/server-to-server-s2s-callback-configuration#example) * [Steps to validate the value of the hash](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/server-to-server-s2s-callback-configuration#steps-to-validate-the-value-of-the-hash) * [3.2. IP Whitelisting](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/server-to-server-s2s-callback-configuration#id-3.2.-ip-whitelisting) sun-brightdesktopmoon Copy function calculateHash() { $user = $_GET['user_id']; $token = $_GET['token']; $value = $_GET['value']; $template = . "." . $user . "." . (int)$value . "." $token; return calculateMD5($template); } function calculateMD5($data) { return hash('md5', $data); } $hash = $_GET['signature']; if ($hash != calculateHash()) { return false } Copy const md5 = require('md5') const template = `${}.${}.${Math.trunc()}.${}` const hash = md5(template) if(signature != hash) { return false } Copy import hashlib template = '{secret_key}.{user_id}.{value}.{token}'.format(secret_key=,user_id=,value=int(),token=) hash = hashlib.md5(template.encode('utf-8')).hexdigest() if hash != : return false Copy template := fmt.Sprintf("%s.%s.%d.%s", , , ), ) hash := toMD5(template) if hash != {signature} { return errors.New("invalid signature") } func toMD5(text string) string { algorithm := md5.New() algorithm.Write([]byte(text)) return hex.EncodeToString(algorithm.Sum(nil)) } Copy 34.100.236.68 //Last updated at: Jan 23, 2024 sun-brightdesktopmoon --- # IP Whitelist | 1.0.7 | Offerwall SDK You can restrict the callbacks to be accepted only from our sever IP address(es). Please whitelist the following IP(s) and regularly check back to find possible changes Copy 34.100.236.68 //Last updated at: Jan 23, 2024 [PreviousS2S Callback Configurationchevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/s2s-callback-configuration/s2s-callback-configuration) [NextSandbox Environmentchevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/sandbox-environment/sandbox-environment) Last updated 1 year ago --- # Setting up the SDK | 1.0.6-beta1 | Offerwall SDK #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1/react-native/setting-up-the-sdk#id-1.-add-this-to-your-build.gradle-file) 1\. Add this to your build.gradle file Add the below line inside the **dependencies** block in your build.gradle file Kotlin Script Groovy Copy implementation('com.pubscale.sdkone:offerwall:1.0.6-beta1') Copy implementation 'com.pubscale.sdkone:offerwall:1.0.6-beta1' #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1/react-native/setting-up-the-sdk#id-2.-clean-build-and-rebuild-the-project) 2\. Clean build and Rebuild the project #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1/react-native/setting-up-the-sdk#id-3.-configure-proguard-rules) 3\. Configure proguard rules For the SDK to work properly in release(obfuscated/minified) builds, add the following rules in your proguard-rules.pro file. proguard-rules.pro Copy -keep class com.pubscale.sdkone.offerwall.** {*;} #Supporting R8 full mode -keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation -keep,allowobfuscation,allowshrinking interface retrofit2.Call -keep,allowobfuscation,allowshrinking class retrofit2.Response We have added the SDK to the project. Learn how to initialize the SDK in the next step #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1/react-native/setting-up-the-sdk#id-5.-add-native-module-files) 5\. Add native module files Add the following files to your android app's module directory. * [PubscaleOfferwallSdkModule.javaarrow-up-right](https://storage.googleapis.com/pubscale-offerwall/lib/PubscaleOfferwallSdkModule.java) * [PubscaleOfferwallSdkPackage.java](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1) #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1/react-native/setting-up-the-sdk#id-6.-link-the-module) 6\. Link the module Add the following line inside the getPackages() method of MainApplication class. `packages.add(new PubscaleOfferwallSdkPackage());` ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2FcJjYVtSXK83YJkG3H9nv%2Fblobs%2Foos3IZWjwdVDEtjRGJF7%2Fimage.png&width=768&dpr=3&quality=100&sign=cd15d9&sv=2) Adding PubscaleOfferwallSdkPackage to React packages We have setup the SDK in the project. Learn how to initialize the SDK in the next step [PreviousStart the OfferWallchevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1/native-android/start-the-offerwall) [NextInitialize the SDKchevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1/react-native/initialize-the-sdk) Last updated 2 years ago --- # Sandbox Environment | 1.0.9 | Offerwall SDK Sandbox environment enables you to test out the integration before you release your app. You will be able to test the complete integration starting from initializing the SDK to getting callbacks. Also, any changes in the sandbox environment do not affect the production environment. 1. **Switch to the sandbox environment using the toggle in the dashboard** circle-info Switching to the Sandbox environment in the dashboard does not affect your production environment. ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2F9dUUmbZ8oNwa2CoHqvab%2Fblobs%2FzEnl3z0WO9Wi45B4Jg0m%2FGroup%252078582.png&width=768&dpr=3&quality=100&sign=7f57ff3f&sv=2) Sandbox Environment toggle 1. **Copy the app ID shown for the sandbox environment and use it in the app** 2. **Additionally, you can also configure a different S2S callback for your sandbox environment by clicking on the Configure Callback button in the sandbox environment.** [PreviousServer-to-Server (S2S) Callback Configurationchevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/server-to-server-s2s-callback-configuration) [NextSampleschevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/samples) sun-brightdesktopmoon sun-brightdesktopmoon --- # Samples | 1.0.6-beta2 | Offerwall SDK 1. [Sample integration - GitRepo - Kotlinarrow-up-right](https://github.com/GreedyGame/sdkone-android-samples/tree/main/kotlin/OfferWallExample) 2. [Sample integration - GitRepo - Javaarrow-up-right](https://github.com/GreedyGame/sdkone-android-samples/tree/main/java/OfferWallExample) 3. [Sample apparrow-up-right](https://pro.chillar.co.in/download) [PreviousSandbox Environmentchevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/sandbox-environment/sandbox-environment) --- # Welcome to PubScale Offerwall SDK | 1.0.6-beta2 | Offerwall SDK ![Page cover](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2F47uqFPZw7HlLBl2j2OyM%2Fblobs%2FISBQsuHhQwZxtdY4gfTy%2Fbanner%25201.jpg&width=1248&dpr=3&quality=100&sign=adb43078&sv=2) [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2#overview) Overview --------------------------------------------------------------------------------------- The PubScale Offerwall SDK is an app monetization tool that allows developers to make incremental revenue by asking the user to complete some task in exchange for in-app currency. [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2#benefits) Benefits --------------------------------------------------------------------------------------- 1. Incremental revenue 2. Monetize non-paying users 3. Improves user retention [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2#features) Features --------------------------------------------------------------------------------------- 1. **Instant reward offers:** You get offers that give out instant rewards on completion. 2. **Fraud prevention:** Our inbuilt fraud detection and prevention system ensures that all the conversions that happen from the app are legit. 3. **Easy integration:** The SDK provides a straightforward integration process, and can be done within a few hours. [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2#quick-links) Quick links --------------------------------------------------------------------------------------------- 1. [PubScale dashboardarrow-up-right](https://dashboard.pubscale.com/) 2. [Sample app and code](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/samples) [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2#get-started) Get Started --------------------------------------------------------------------------------------------- We've put together some helpful guides for you to get set up with our SDK quickly and easily. [📪Prerequisiteschevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/prerequisites/prerequisites) [Native Androidchevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/native-android/setting-up-the-sdk) [React Nativechevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/react-native/setting-up-the-sdk) [🦉S2S Callback Configurationchevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/s2s-callback-configuration/s2s-callback-configuration) [NextPrerequisiteschevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/prerequisites/prerequisites) Last updated 2 years ago * [Overview](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2#overview) * [Benefits](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2#benefits) * [Features](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2#features) * [Quick links](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2#quick-links) * [Get Started](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2#get-started) --- # Sandbox Environment | 1.0.7 | Offerwall SDK Sandbox environment enables you to test out the integration before you release your app. You will be able to test the complete integration starting from initializing the SDK to getting callbacks. Also, any changes in the sandbox environment do not affect the production environment. 1. **Switch to the sandbox environment using the toggle in the dashboard** circle-info Switching to the Sandbox environment in the dashboard does not affect your production environment. ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fhi3J82Irfk38cjMHFvTF%2Fblobs%2FT8TXDZPpYKMkIdvODezO%2FGroup%252078582.png&width=768&dpr=3&quality=100&sign=b9cd6127&sv=2) Sandbox Environment toggle 1. **Copy the app ID shown for the sandbox environment and use it in the app** 2. **Additionally, you can also configure a different S2S callback for your sandbox environment by clicking on the Configure Callback button in the sandbox environment.** [PreviousIP Whitelistchevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/s2s-callback-configuration/ip-whitelist) [NextSampleschevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.7/samples) Last updated 1 year ago --- # Sandbox Environment | 1.0.6-beta1 | Offerwall SDK Sandbox environment enables you to test out the integration before you release your app. You will be able to test the complete integration starting from initializing the SDK to getting callbacks. Also, any changes in the sandbox environment do not affect the production environment. 1. **Switch to the sandbox environment using the toggle in the dashboard** circle-info Switching to the Sandbox environment in the dashboard does not affect your production environment. ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2F4187661493-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FcJjYVtSXK83YJkG3H9nv%252Fuploads%252FvwyCRD1eA0mzGhRN5z3i%252FGroup%252078582.png%3Falt%3Dmedia%26token%3D856a568f-7127-46a6-9444-1f0c98388fab&width=768&dpr=3&quality=100&sign=4df842b8&sv=2) Sandbox Environment toggle 1. **Copy the app ID shown for the sandbox environment and use it in the app** 2. **Additionally, you can also configure a different S2S callback for your sandbox environment by clicking on the Configure Callback button in the sandbox environment.** [PreviousS2S Callback Configurationchevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1/s2s-callback-configuration/s2s-callback-configuration) [NextSampleschevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1/samples) Last updated 2 years ago --- # Setting up your app | 1.0.9 | Offerwall SDK ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/setting-up-your-app#id-1.-create-an-account) 1\. Create an account Create an account with PubScale through the dashboard at [https://dashboard.pubscale.comarrow-up-right](https://dashboard.pubscale.com/) ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/setting-up-your-app#id-2.-creating-an-offerwall-unit) 2\. Creating an Offerwall Unit Once you have signed in, you can access Offerwall from the side navigation list. 1. Click on the **Offerwall** item on the navigation list ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2F9dUUmbZ8oNwa2CoHqvab%2Fblobs%2FK5zkwq5a6L9tULQEuu2S%2FGroup%252078578.png&width=768&dpr=3&quality=100&sign=269e7d66&sv=2) 1. Next, create an Offerwall placement for the app by clicking on the **Create Offerwall** button and create the offerwall unit by providing the required details and config. ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2F9dUUmbZ8oNwa2CoHqvab%2Fblobs%2FEg7kFlIY1r6SxaZZf4cd%2FGroup%252078579.png&width=768&dpr=3&quality=100&sign=a339a59b&sv=2) 1. Once the Offerwall unit is created, you have to make it Live to start using the Offerwall. ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2F9dUUmbZ8oNwa2CoHqvab%2Fblobs%2F4sia7rIl4kIp4hANnnk8%2FGroup%252078580.png&width=768&dpr=3&quality=100&sign=a5450486&sv=2) 1. You can setup S2S callbacks here for better security and instant updates on rewards. ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2F9dUUmbZ8oNwa2CoHqvab%2Fblobs%2F5BaUpl4HJpReLhU4i3Ka%2FGroup%252078580%2520%281%29.png&width=768&dpr=3&quality=100&sign=6dcd9d5d&sv=2) [PreviousWelcome to PubScale Offerwall SDKchevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.9) [NextAndroid Integrationchevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/android-integration) Last updated 1 year ago * [1\. Create an account](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/setting-up-your-app#id-1.-create-an-account) * [2\. Creating an Offerwall Unit](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/setting-up-your-app#id-2.-creating-an-offerwall-unit) sun-brightdesktopmoon sun-brightdesktopmoon --- # PubScale Onboarding | 1.0.6-beta2 | Offerwall SDK ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/prerequisites/pubscale-onboarding#create-an-account) Create an account Create an account with PubScale through the dashboard at [https://dashboard.pubscale.comarrow-up-right](https://dashboard.pubscale.com/) ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/prerequisites/pubscale-onboarding#request-offerwall-sdk) Request Offerwall SDK The Offerwall SDK is currently released as an invite-only feature on the dashboard. You will have to request your account manager for this feature to be visible in your account after you have signed up on the dashboard. Once you have the feature enabled, you can proceed with creating an app and the integration flow. ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/prerequisites/pubscale-onboarding#creating-an-offerwall-unit) Creating an Offerwall Unit Once the feature is enabled, you can access it from the side navigation list. 1. Click on the **Offerwall** item on the navigation list ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2F47uqFPZw7HlLBl2j2OyM%2Fblobs%2FrDud3oKkOB5oJPabMBK6%2FGroup%252078578.png&width=768&dpr=3&quality=100&sign=b694b1b8&sv=2) 1. Next, create an Offerwall placement for the app by clicking on the **Create Offerwall** button and create the offerwall unit by providing the required details and config. ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2F47uqFPZw7HlLBl2j2OyM%2Fblobs%2Fg4IosUeZsrVAcZQEPfLn%2FGroup%252078579.png&width=768&dpr=3&quality=100&sign=8d6f39cf&sv=2) 1. Once the Offerwall unit is created, you have to make it Live to start using the Offerwall. ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2F47uqFPZw7HlLBl2j2OyM%2Fblobs%2F2NaTdnpZTbN0e3CN16by%2FGroup%252078580.png&width=768&dpr=3&quality=100&sign=2ca43b28&sv=2) 1. Additionally, you can also setup S2S callbacks for better security. ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2F47uqFPZw7HlLBl2j2OyM%2Fblobs%2FhbgNqnP4fZI6jqHnT2ve%2FGroup%252078580%2520%281%29.png&width=768&dpr=3&quality=100&sign=5eb1084c&sv=2) [PreviousPrerequisiteschevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/prerequisites/prerequisites) [NextSetting up the SDKchevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/native-android/setting-up-the-sdk) * [Create an account](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/prerequisites/pubscale-onboarding#create-an-account) * [Request Offerwall SDK](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/prerequisites/pubscale-onboarding#request-offerwall-sdk) * [Creating an Offerwall Unit](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/prerequisites/pubscale-onboarding#creating-an-offerwall-unit) --- # API | Offerwall SDK By integrating this API, publishers can seamlessly fetch and display these offers within their own user interface. This allows for the creation of fully native and personalised in-app experiences that align with the app’s design and user flow, enhancing user engagement and improving conversion rates. triangle-exclamation Pre-approval from PubScale team is required for the offerwall integration. Please contact your account manager or reach out to support before starting this integration. [Learn More](https://pubscale.gitbook.io/offerwall-sdk/faqs#how-to-approval-for-web-integration) [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/api#id-1.-authentication) 1\. Authentication ----------------------------------------------------------------------------------------------------------------------- In order to access offers API. Following Keys need to be generated. 1. Pub Key (Generated once per publisher) 2. App ID #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/api#app-id) App-ID In order to generate an App ID follow this guide for instructions on [how to set up your app](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/setting-up-your-app) . Once completed, you will receive a unique 8-digit App ID. This will be used as App ID to access the API. #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/api#pub-key) Pub-Key In order the generate a Pub-Key a pre-approval is required. This is a one time approval for a publisher. Please contact account manager for the same. Go to the **Settings > API Key** section to get your Offerwall Pub-Key. ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2F95496035-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fx0ylFv11SuG05Xj0pGLn%252Fuploads%252FpHekR6tktfVv57Crf3nB%252Fimage%2520%281%29.png%3Falt%3Dmedia%26token%3D203634b7-de9b-422d-8c70-0bf44830a8d0&width=768&dpr=3&quality=100&sign=15e35d0e&sv=2) circle-exclamation You can regenerate the Pub-Key by contacting your Account Manager. Once the Offerwall Pub-Key is regenerated, the existing Pub-Key will no longer be valid. * * * [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/api#id-2.-offers-api) 2\. Offers API: ---------------------------------------------------------------------------------------------------------------- ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/api#description) Description: The API provides a list of offers available for your app, which can be used to display and run offers on your platform. circle-exclamation Offers are cached on our server and refreshed every 5 minutes. We recommend updating your inventory accordingly. ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/api#endpoint) Endpoint: #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/api#auth) Auth: The keys generated in the previous steps must be included in the following headers when making API requests. These are **Mandatory** for accessing the API. * **App-Id** – The unique App ID generated for your app during the setup process. * **Pub-Key** – The unique key generated for your publisher account during setup. This key is shared across all apps within the same account. ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/api#example) Example: ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/api#payload) Payload: Body Required Type Description page Required Integer The `page` field in the Offers API response indicates the current page number and should always be a positive integer. size Required Integer The `size` field in the Offers API response represents the number of offers returned in that response and should always be a positive integer. filt Optional Array Contains an array of filters to be applied to the Offers API request to refine the results based on specified criteria. dim Optional String Specifies the dimension on which the filter is applied. Supported values are `offer_type`, `platform`, and `country`. match Optional Model Contains details about the filter to be applied, including the values to filter by and the match type used for filtering. type Optional String Specifies the match type to be used for the filter. Supported values are `any` (matches any of the provided values) and `exact` (requires a single, exact value match). values Optional Array Contains the values to apply the filter on. Allowed values depend on the specified filter dimension. chevron-rightFilter Values[hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/api#filter-values) **Offer Type**: * `CPR` – Cost Per Registration * `CPI` - Cost Per Install * `CPL` – Cost Per Lead * `CPC` – Cost Per Click * `CPE` – Cost Per Engagement * `CPA` – Cost Per Action * `APK_INSTALL` – APK-based Install * `APK_REGISTER` – APK-based Registration **Example Curl:** **Platforms** * `ios` – Apple iOS platform * `android` – Android platform * `web` – Web-based platform **Example Curl:** **Country** * Countries must be specified using the **standard ISO Alpha-2 country codes** (e.g., `US` for United States, `IN` for India, `FR` for France). **Example Curl:** * * * ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/api#example-response) Example Response: chevron-rightResponse Details[hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/api#response-details) Field Description `offers` An array containing the offer details. Each element represents an individual offer. `id` A unique identifier for the offer. `upd_ts` The timestamp when the offer was last updated (in UNIX timestamp format). `off_type` The type of offer (e.g., `CPI` for Cost Per Install, `CPC` for Cost Per Click, etc.). `s_id` The unique identifier for the app associated with the offer. `name` The name of the app or offer. `lp_url` The link to the landing page for the app (usually a store link). `pyt` Payment details for the offer. Contains `cur` (currency) and `amt` (amount). `inapp_pyt` Displays payout details in the application's currency, with `cur` representing the currency name and `amt` the amount, based on app settings. `crtvs` Creatives related to the offer. Contains `ic_url` (URL to the icon image). `desc` Description of the offer. Contains `raw` (raw description text). `ctg` Categories associated with the offer (e.g., `SINGLE_STEP`). **Possible values**: `SINGLE_STEP`, `MULTI_REWARD`, `DEPOSIT`, `GAMING`, `FINANCE`, `SURVEY`, `NEW` `gls` A list of goals for the offer. Each goal has `id`, `gl_val` (value), `ttl` (title), `instr` (instructions), and `pyt` (payment details) and `inapp_yt`(payment in apps currency). `trk_url` Tracking URL for tracking user actions like clicks or installs, with placeholders for dynamic user data. `geo_tgt` Geographical targeting information. Contains `include` (countries to include) and `exclude` (countries to exclude). `os` The operating system platform for the app (e.g., `android`, `ios`). `total` The total number of offers available (in this case, `1931` offers). `metrics` Contains performance metrics related to the offer, including CR (Conversion Rate) and EPC (Earnings Per Click). Currently, only global values are supported. * * * [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/api#id-3.-click-parameters) 3\. Click Parameters: ---------------------------------------------------------------------------------------------------------------------------- You can use the tracking link provided in the `trk_url` field of each offer in the API response to start sending click events to Pubscale. This tracking link is essential for monitoring user interactions and attributing tasks correctly. Purpose The `trk_url` is used to track clicks from users on a particular offer. When a user interacts with an offer, your app or system should trigger this URL with the appropriate parameters. * * * #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/api#supported-click-parameters) Supported Click Parameters The following query parameters are supported for integration with the tracking URL: Parameter Required Description `user_id` Manadatory The unique identifier of the user who clicks on the offer. This will be included in the callback. Special characters aren't allowed except "\_","@","-" and ".". `gaid` Recomended Google Advertising ID (required for Android users). `idfa` Recomended Identifier for Advertisers (required for iOS users). `c1-c5` Optional Custom parameters can be appended to the tracking URL by the publisher and will be included in the callback for reference. Special characters aren't allowed except "\_","@","-" and "." [hashtag](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/api#id-3.-test-the-offerwall) 4\. Setup Server-to-Server(S2S) callbacks -------------------------------------------------------------------------------------------------------------------------------------------------- circle-check This step is manadatory for rewarding users. Set up the Server-to-Server (S2S) callbacks to receive instant updates whenever a user completes an offer and earns a reward. When an offer is completed, our server will send a notification to the configured callback URL. This callback provides the necessary information to process and verify the reward for the user in your application. [Learn more.](https://pubscale.gitbook.io/offerwall-sdk/server-to-server-s2s-callback-configuration) [PreviousiOSchevron-left](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/ios) [NextServer-to-Server (S2S) Callback Configurationchevron-right](https://pubscale.gitbook.io/offerwall-sdk/server-to-server-s2s-callback-configuration) Last updated 2 months ago * [1\. Authentication](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/api#id-1.-authentication) * [2\. Offers API:](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/api#id-2.-offers-api) * [Description:](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/api#description) * [Endpoint:](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/api#endpoint) * [Example:](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/api#example) * [Payload:](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/api#payload) * [Example Response:](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/api#example-response) * [3\. Click Parameters:](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/api#id-3.-click-parameters) * [4\. Setup Server-to-Server(S2S) callbacks](https://pubscale.gitbook.io/offerwall-sdk/basic-integration/api#id-3.-test-the-offerwall) sun-brightdesktopmoon Copy POST https://api-ow.pubscale.com/v1/offer/api Copy curl 'https://api-ow.pubscale.com/v1/offer/api' \ --header 'App-Id: ' \ --header 'Pub-Key: ' \ --header 'Content-Type: application/json' \ --data '{ "page": 1, "size": 1000, "filt": [\ {\ "dim": "offer_type",\ "match": {\ "type": "any",\ "value": [\ "CPI"\ ]\ }\ }\ ] }' Copy curl --location 'https://api-dev.sikkaapp.in/v1/offer/api' \ --header 'App-Id: 77754913' \ --header 'Pub-Key: 09DAE7FB5D9AA83582DE7703348D8087' \ --header 'Content-Type: application/json' \ --data '{ "page": 1, "size": 1000, "filt": [\ {\ "dim": "offer_type",\ "match": {\ "type": "any",\ "value": [\ "CPI","CPA"\ ]\ }\ }\ ] }' -v Copy curl --location 'https://api-dev.sikkaapp.in/v1/offer/api' \ --header 'App-Id: 77754913' \ --header 'Pub-Key: 09DAE7FB5D9AA83582DE7703348D8087' \ --header 'Content-Type: application/json' \ --data '{ "page": 1, "size": 1000, "filt": [\ {\ "dim": "platform",\ "match": {\ "type": "any",\ "value": [\ "web","ios","android"\ ]\ }\ }\ ] }' -v Copy curl --location 'https://api-dev.sikkaapp.in/v1/offer/api' \ --header 'App-Id: 77754913' \ --header 'Pub-Key: 09DAE7FB5D9AA83582DE7703348D8087' \ --header 'Content-Type: application/json' \ --data '{ "page": 1, "size": 1000, "filt": [\ {\ "dim": "country",\ "match": {\ "type": "any",\ "value": [\ "IN","US"\ ]\ }\ }\ ] }' -v Copy { "offers": [\ {\ "id": "973839",\ "upd_ts": 1745834294,\ "off_type": "CPI",\ "s_id": "nova.solitaire.patience.card.games.klondike.free",\ "name": "Classic Solitaire : Card Game",\ "lp_url": "https://play.google.com/store/apps/details?id=nova.solitaire.patience.card.games.klondike.free",\ "pyt": {\ "cur": "USD",\ "amt": 0.0325\ },\ "inapp_pyt": {\ "cur": "Bullets",\ "amt": 4.875\ }\ "crtvs": {\ "ic_url": "https://play-lh.googleusercontent.com/TIogtAtBq22AAHUK8q0nkXVi3KPPssCqIjp2J5JmLLuw8sdStdpeiRsPg1STEIo2ng"\ },\ "desc": {\ "raw": "Classic Solitaire : Card Game"\ },\ "ctg": [\ "SINGLE_STEP"\ ],\ "gls": [\ {\ "id": "2710875",\ "gl_val": null,\ "ttl": "Complete Install and Use The App",\ "instr": "1.Click on redeem now.\n2.Install the app.\n3.Use the app.\n4.Explore the app and enjoy.",\ "pyt": {\ "cur": "USD",\ "amt": 0.0325\ },\ "inapp_pyt": {\ "cur": "Bullets",\ "amt": 4.875\ },\ "ord": 1\ }\ ],\ "trk_url": "https://api-ow.pubscale.com/v2/tracking/click?rid=2710875&app=77754913&user_id={your_user_id}&gaid={gaid_for_android}&idfa={idfa_for_ios}",\ "geo_tgt": {\ "include": [\ "AT"\ ],\ "exclude": []\ },\ "os": "android",\ "metrics": [\ {\ "m_type": "GLOBAL",\ "cr": 80,\ "epc": 23.87\ }\ ]\ }\ ], "total": 1931 } sun-brightdesktopmoon --- # Sandbox Environment | 1.0.10 | Offerwall SDK Sandbox environment enables you to test out the integration before you release your app. You will be able to test the complete integration starting from initializing the SDK to getting callbacks. Also, any changes in the sandbox environment do not affect the production environment. 1. **Switch to the sandbox environment using the toggle in the dashboard** circle-info Switching to the Sandbox environment in the dashboard does not affect your production environment. ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2FwtFu5cQcg9ZXDSngP2aN%2Fblobs%2FNVTUuXGsGT9Ny3shGvow%2FGroup%252078582.png&width=768&dpr=3&quality=100&sign=10113b5&sv=2) Sandbox Environment toggle 1. **Copy the app ID shown for the sandbox environment and use it in the app** 2. **Additionally, you can also configure a different S2S callback for your sandbox environment by clicking on the Configure Callback button in the sandbox environment.** [PreviousServer-to-Server (S2S) Callback Configurationchevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/server-to-server-s2s-callback-configuration) [NextSampleschevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/samples) sun-brightdesktopmoon sun-brightdesktopmoon --- # Initialize the SDK | 1.0.6-beta2 | Offerwall SDK To initialize the SDK, call the PubscaleOfferwall.init() method. Pass the app API key (generated from the console) as the first parameter of the init method. Make sure to call the init method as soon as your app starts up, ideally in app.js or index.js. #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/react-native/initialize-the-sdk#optional-parameters) Optional Parameters: **user\_id:** Pass your user's id in this field to tag your user. This id will be sent along with the S2S callback. Make sure to call the init function every time the user id changes. **background\_Base64:** An image that will be displayed as a banner on top of the offer wall. Pass the image in base64 encoded format. The background will be black by default. **appicon\_Base64:** An image that will be displayed in the center on the top banner of the offerwall. Pass the image in base64 encoded format. Default value is the app icon. ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/react-native/initialize-the-sdk#initializing-the-sdk) Initializing the SDK circle-info Use sandbox environment app ID for testing purposes. [Sandbox Environment](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/sandbox-environment/sandbox-environment) - Learn how to setup Sandbox environment Copy import {NativeModules, Alert} from 'react-native'; const {PubscaleOfferwall} = NativeModules; //initialises the SDK. //call init once the user is logged in. PubscaleOfferwall.init( "APP_ID", { "user_id": "test-user", //optional, but require to tag user to offer completion. "background_Base64": base64Image, "appicon_Base64": app64Image, //optional }, () => { //onSuccess Callback console.log("success") }, (errMsg)=>{ //onFailure Callbacks console.log(errMsg) }) The SDK Initialization is complete. Learn how to launch the offerwall in the next step. [PreviousSetting up the SDKchevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/react-native/setting-up-the-sdk) [NextStart the OfferWallchevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/react-native/start-the-offerwall) --- # React Native | 1.0.9 | Offerwall SDK circle-exclamation **Before you start** To set up the PubScale Offerwall, you’ll need to add your app to our platform. Follow this guide for instructions on [how to set up your app](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/setting-up-your-app) . Once completed, you will receive a unique 8-digit app ID. [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/react-native#id-1.-add-this-to-your-build.gradle-file) 1\. Add this to your build.gradle file ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Add the below line inside the **dependencies** block in your build.gradle file Kotlin Script Groovy Copy implementation('com.pubscale.sdkone:offerwall:1.0.9') Copy implementation 'com.pubscale.sdkone:offerwall:1.0.9' [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/react-native#id-2.-configure-proguard-rules) 2\. Configure proguard rules ---------------------------------------------------------------------------------------------------------------------------------------------------------- For the SDK to work properly in release(obfuscated/minified) builds, add the following rules in your proguard-rules.pro file. proguard-rules.pro Copy -keep class com.pubscale.sdkone.offerwall.** {*;} -keep class com.pubscale.caterpillar.analytics.** {*;} #Supporting R8 full mode -keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation -keep,allowobfuscation,allowshrinking interface retrofit2.Call -keep,allowobfuscation,allowshrinking class retrofit2.Response We have added the SDK to the project. Learn how to initialize the SDK in the next step [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/react-native#id-3.-add-native-module-files) 3\. Add native module files -------------------------------------------------------------------------------------------------------------------------------------------------------- Add the following files to your android app's module directory. * [PubscaleOfferwallSdkModule.javaarrow-up-right](https://storage.googleapis.com/pubscale-offerwall/lib/PubscaleOfferwallSdkModule.java) * [PubscaleOfferwallSdkPackage.javaarrow-up-right](https://storage.googleapis.com/pubscale-offerwall/lib/PubscaleOfferwallSdkPackage.java) ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/react-native#id-3.1.-link-the-module) 3.1. Link the module Add the following line inside the getPackages() method of MainApplication class. `packages.add(new PubscaleOfferwallSdkPackage());` ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2F9dUUmbZ8oNwa2CoHqvab%2Fblobs%2FIIq5KtFCeEF1kXRn81sj%2Fimage.png&width=768&dpr=3&quality=100&sign=28a125e0&sv=2) Adding PubscaleOfferwallSdkPackage to React packages [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/react-native#id-4.-initialize-the-sdk) 4\. Initialize the SDK ---------------------------------------------------------------------------------------------------------------------------------------------- To initialize the SDK, call the PubscaleOfferwall.init() method. Pass the app\_id (generated from the console) as the first parameter of the init method. Make sure to call the init method as soon as your app starts up, ideally in app.js or index.js. circle-info Obtain your **app\_id** from the [PubScale Dashboardarrow-up-right](https://dashboard.pubscale.com/) by [adding your app and configuring the offerwall.](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/setting-up-your-app) Once completed, you will receive a unique 8-digit app ID. #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/react-native#optional-parameters) Optional Parameters: Parameter Description **user\_id** Pass your user's id in this field to tag your user. This id will be sent along with the S2S callback. Make sure to call the init function every time the user id changes. **background\_Base64** An image that will be displayed as a banner on top of the offer wall. Pass the image in base64 encoded format. The background will be black by default. **appicon\_Base64** An image that will be displayed in the center on the top banner of the offerwall. Pass the image in base64 encoded format. Default value is the app icon. ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/react-native#id-4.1.-making-the-init-call) 4.1. Making the Init call circle-info Use sandbox environment app ID for testing purposes. [Sandbox Environment](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/sandbox-environment/sandbox-environment) - Learn how to setup Sandbox environment [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/react-native#id-5.-start-the-offerwall) 5\. Start the OfferWall ------------------------------------------------------------------------------------------------------------------------------------------------ To start the offerwall, just call, `PubscaleOfferwall.launch()` method. [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/react-native#id-3.-test-the-offerwall) 6\. Setup S2S callbacks ----------------------------------------------------------------------------------------------------------------------------------------------- Setup the S2S callbacks to get instant updates whenever the user gets the reward. You can use this callback to reward the user in your application. [Learn more.](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/s2s-callback-configuration/ip-whitelist) [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/react-native#id-3.-test-the-offerwall-1) 7\. Test the OfferWall ------------------------------------------------------------------------------------------------------------------------------------------------ circle-info Please use the sandbox environment for testing purposes to get instant callbacks and rewards. To learn how to enable the Sandbox environment, [click here](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/sandbox-environment/sandbox-environment) . Finally, To test the offerwall, build the application to an actual device. Check if you can launch the Offerwall and get the appropriate callbacks. [PreviousAndroid Integrationchevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/android-integration) [NextUnitychevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/unity) Last updated 1 year ago * [1\. Add this to your build.gradle file](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/react-native#id-1.-add-this-to-your-build.gradle-file) * [2\. Configure proguard rules](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/react-native#id-2.-configure-proguard-rules) * [3\. Add native module files](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/react-native#id-3.-add-native-module-files) * [3.1. Link the module](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/react-native#id-3.1.-link-the-module) * [4\. Initialize the SDK](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/react-native#id-4.-initialize-the-sdk) * [4.1. Making the Init call](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/react-native#id-4.1.-making-the-init-call) * [5\. Start the OfferWall](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/react-native#id-5.-start-the-offerwall) * [6\. Setup S2S callbacks](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/react-native#id-3.-test-the-offerwall) * [7\. Test the OfferWall](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/react-native#id-3.-test-the-offerwall-1) sun-brightdesktopmoon Copy import {NativeModules, Alert} from 'react-native'; const {PubscaleOfferwall} = NativeModules; //initialises the SDK. //call init once the user is logged in. PubscaleOfferwall.init( "app_id", { "user_id": "test-user", //optional, but require to tag user to offer completion. "background_Base64": base64Image, "appicon_Base64": app64Image, //optional }, () => { //onSuccess Callback console.log("success") }, (errMsg)=>{ //onFailure Callbacks console.log(errMsg) }) Copy PubscaleOfferwall.launch(() => { console.log("close"); //onClose }, (errMsg) => { console.log(errMsg); //onFailure }); sun-brightdesktopmoon --- # Setting up the SDK | 1.0.6-beta2 | Offerwall SDK #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/react-native/setting-up-the-sdk#id-1.-add-this-to-your-build.gradle-file) 1\. Add this to your build.gradle file Add the below line inside the **dependencies** block in your build.gradle file Kotlin Script Groovy Copy implementation('com.pubscale.sdkone:offerwall:1.0.6-beta2') Copy implementation 'com.pubscale.sdkone:offerwall:1.0.6-beta2' #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/react-native/setting-up-the-sdk#id-2.-clean-build-and-rebuild-the-project) 2\. Clean build and Rebuild the project #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/react-native/setting-up-the-sdk#id-3.-configure-proguard-rules) 3\. Configure proguard rules For the SDK to work properly in release(obfuscated/minified) builds, add the following rules in your proguard-rules.pro file. proguard-rules.pro Copy -keep class com.pubscale.sdkone.offerwall.** {*;} -keep class com.pubscale.caterpillar.analytics.** {*;} #Supporting R8 full mode -keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation -keep,allowobfuscation,allowshrinking interface retrofit2.Call -keep,allowobfuscation,allowshrinking class retrofit2.Response We have added the SDK to the project. Learn how to initialize the SDK in the next step #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/react-native/setting-up-the-sdk#id-5.-add-native-module-files) 5\. Add native module files Add the following files to your android app's module directory. * [PubscaleOfferwallSdkModule.javaarrow-up-right](https://storage.googleapis.com/pubscale-offerwall/lib/PubscaleOfferwallSdkModule.java) * [PubscaleOfferwallSdkPackage.javaarrow-up-right](https://storage.googleapis.com/pubscale-offerwall/lib/PubscaleOfferwallSdkPackage.java) #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/react-native/setting-up-the-sdk#id-6.-link-the-module) 6\. Link the module Add the following line inside the getPackages() method of MainApplication class. `packages.add(new PubscaleOfferwallSdkPackage());` ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2F47uqFPZw7HlLBl2j2OyM%2Fblobs%2FeQPqDJewEXixbXkVPc6k%2Fimage.png&width=768&dpr=3&quality=100&sign=65d74839&sv=2) Adding PubscaleOfferwallSdkPackage to React packages We have setup the SDK in the project. Learn how to initialize the SDK in the next step [PreviousStart the OfferWallchevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/native-android/start-the-offerwall) [NextInitialize the SDKchevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/react-native/initialize-the-sdk) Last updated 2 years ago --- # Server-to-Server (S2S) Callback Configuration | 1.0.10 | Offerwall SDK You can configure the S2S callback for the offerwall in the dashboard inside the Offerwall's overview section. [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/server-to-server-s2s-callback-configuration#id-1.-setup-callback-url) 1\. Setup Callback URL ------------------------------------------------------------------------------------------------------------------------------------------------------------ When a user has earned a reward by completing an offer, we fire an HTTP GET request to the provided callback URL. The following query parameters will be part of the request. circle-info **Example callback setup:** **Callback URL set by you:** http://www.example.com/payments/offers/pubscale **Request sent from us:** HTTP GET http://www.example.com/payments/offers/pubscale?user\_id=&value=&token=&signature= Copy ?user_id=&value=&token=&signature= //Example http://www.example.com/payments/offers/pubscale?user_id=&value=&token=&signature= Query Params Description user\_id The 'unique\_id' set while initializing the SDK. value The decimal value of the reward earned by the user. token A token that uniquely represents the transaction. signature Hash of the above values to verify the request (more info below). [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/server-to-server-s2s-callback-configuration#id-2.-server-response) 2\. Server Response ------------------------------------------------------------------------------------------------------------------------------------------------------ Responding to the callback URL with status codes between and including the values 200 to 299 will mark the callback as successfully delivered. In the event of the server not responding with any of the aforementioned status codes, the request will be **retried 6 times** at different intervals. You can utilize the unique token sent in the request to avoid rewarding the user multiple times for the same callback. [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/server-to-server-s2s-callback-configuration#id-3.-optional-parameters-for-fraud-detection-prevention) 3\. Optional Parameters for fraud detection/prevention ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/server-to-server-s2s-callback-configuration#id-3.1.-hash-validation) 3.1. Hash validation The value sent in the signature parameter can be used to validate the identity of the origin of the request. The value is an MD5 hash of the template below. The secret key is an additional key that will be provided along with the APP API KEY. PHP NodeJs Python Golang ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/server-to-server-s2s-callback-configuration#example) Example secret\_key = `fa072672-d432-11c4-885a-EB1CdEc4Bb13` user\_id = `30356439-8d15-4f47-B133-010a37C19eBD` value = `100.1234` token = `525a5B8e-512b-441A-a10B-72d218c370e5` Final format = `fa072672-d432-11c4-885a-EB1CdEc4Bb13.30356439-8d15-4f47-B133-010a37C19eBD.100.525a5B8e-512b-441A-a10B-72d218c370e5` ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/server-to-server-s2s-callback-configuration#steps-to-validate-the-value-of-the-hash) Steps to validate the value of the hash 1. Concatenate the values in the above format. 2. Make sure to convert the value parameter from decimal to integer. 3. Calculate the MD5 hash of the concatenated value. 4. Build Hex encode of the generated value. 5. Verify if the calculated value is equal to the value sent in the signature parameter. circle-info As the value of the secret key will only be known to you and PubScale’s server, the hash cannot be generated by a fraudulent third party. ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/server-to-server-s2s-callback-configuration#id-3.2.-ip-whitelisting) 3.2. IP Whitelisting You can restrict the callbacks to be accepted only from our sever IP address(es). Please whitelist the following IP(s) and regularly check back to find possible changes [PreviousAPIchevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/api) [NextSandbox Environmentchevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/sandbox-environment/sandbox-environment) * [1\. Setup Callback URL](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/server-to-server-s2s-callback-configuration#id-1.-setup-callback-url) * [2\. Server Response](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/server-to-server-s2s-callback-configuration#id-2.-server-response) * [3\. Optional Parameters for fraud detection/prevention](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/server-to-server-s2s-callback-configuration#id-3.-optional-parameters-for-fraud-detection-prevention) * [3.1. Hash validation](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/server-to-server-s2s-callback-configuration#id-3.1.-hash-validation) * [Example](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/server-to-server-s2s-callback-configuration#example) * [Steps to validate the value of the hash](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/server-to-server-s2s-callback-configuration#steps-to-validate-the-value-of-the-hash) * [3.2. IP Whitelisting](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/server-to-server-s2s-callback-configuration#id-3.2.-ip-whitelisting) sun-brightdesktopmoon Copy function calculateHash() { $user = $_GET['user_id']; $token = $_GET['token']; $value = $_GET['value']; $template = . "." . $user . "." . (int)$value . "." $token; return calculateMD5($template); } function calculateMD5($data) { return hash('md5', $data); } $hash = $_GET['signature']; if ($hash != calculateHash()) { return false } Copy const md5 = require('md5') const template = `${}.${}.${Math.trunc()}.${}` const hash = md5(template) if(signature != hash) { return false } Copy import hashlib template = '{secret_key}.{user_id}.{value}.{token}'.format(secret_key=,user_id=,value=int(),token=) hash = hashlib.md5(template.encode('utf-8')).hexdigest() if hash != : return false Copy template := fmt.Sprintf("%s.%s.%d.%s", , , ), ) hash := toMD5(template) if hash != {signature} { return errors.New("invalid signature") } func toMD5(text string) string { algorithm := md5.New() algorithm.Write([]byte(text)) return hex.EncodeToString(algorithm.Sum(nil)) } Copy 34.100.236.68 //Last updated at: Jan 23, 2024 sun-brightdesktopmoon --- # Web Offerwall | 1.0.9 | Offerwall SDK triangle-exclamation Pre-approval from PubScale team is required for Web offerwall integration. Please contact your account manager or reach out to support before starting this integration. [Learn More](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/faqs#how-to-approval-for-web-integration) [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/web-offerwall#id-1.-integration) 1\. Integration --------------------------------------------------------------------------------------------------------------------------------- circle-exclamation **Before you start** To set up the PubScale Offerwall, you’ll need to add your app to our platform. Follow this guide for instructions on [how to set up your app](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/setting-up-your-app) . Once completed, you will receive a unique 8-digit app ID. ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2F1235736282-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F9dUUmbZ8oNwa2CoHqvab%252Fuploads%252FLJHdDEvW1QbJHL6t2Mhj%252FWow_flow%2520%281%29.png%3Falt%3Dmedia%26token%3Dd8ce3cf0-7d40-4a0c-ba09-dba4a24d39b3&width=768&dpr=3&quality=100&sign=6b4ec5f5&sv=2)![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2F1235736282-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F9dUUmbZ8oNwa2CoHqvab%252Fuploads%252Fxw7aKlgdFzQSnMX3ZTEu%252Fwow_flow_dark.png%3Falt%3Dmedia%26token%3Dd57ae4fc-140d-4475-b793-7395cacc4527&width=768&dpr=3&quality=100&sign=397289b4&sv=2) To integrate the PubScale Offerwall, you need to provide a set of mandatory parameters for proper configuration. **Mandatory Parameters** Parameters Description **app\_id** This is the unique identifier for your app, required for integration. **user\_id** A unique identifier for each user, required to track their activity on the offerwall. To integrate the PubScale Web Offerwall into your website, you have the following options: ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/web-offerwall#id-1.1.-using-an-iframe) **1.1. Using an iframe**: Place the following iframe in your HTML: ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/web-offerwall#id-1.2.-using-a-direct-link) **1.2. Using a Direct Link**: Create a direct link to the PubScale Offerwall using an anchor tag. It is recommended to use an image or button for better user experience: ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/web-offerwall#id-1.3.-using-javascript) **1.3. Using JavaScript:** Open the offerwall link programmatically using `window.open`. This provides flexibility for custom implementations. [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/web-offerwall#id-3.-test-the-offerwall) 2\. Setup Server-to-Server(S2S) callbacks ------------------------------------------------------------------------------------------------------------------------------------------------------------------ Set up the Server-to-Server (S2S) callbacks to receive instant updates whenever a user completes an offer and earns a reward. When an offer is completed, our server will send a notification to the configured callback URL. This callback provides the necessary information to process and verify the reward for the user in your application. [Learn more.](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/server-to-server-s2s-callback-configuration) [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/web-offerwall#id-3.-test-the-offerwall-1) 3\. Test the OfferWall ------------------------------------------------------------------------------------------------------------------------------------------------- circle-info Please use the sandbox environment for testing purposes to get instant callbacks and rewards. To learn how to enable the Sandbox environment, [click here](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/sandbox-environment/sandbox-environment) . To ensure your OfferWall integration is working perfectly, follow these steps during the testing phase. * Open the web offerwall and verify that all offers are displayed correctly. * Complete an offer and confirm that a callback is received from PubScale server to your server. For the sandbox environment, ensure the callback URL is configured properly to receive sandbox callbacks. * Ensure the hashing technique used matches the one specified in the documentation. * Verify that the reward value received matches the value displayed for the offer. * Confirm that the callback is received only from PubScale's [whitelisted server IPs](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/s2s-callback-configuration/ip-whitelist) . circle-exclamation While you can use the Web Offerwall in an Android app through a WebView or Custom Chrome Tabs, we have observed better performance and fewer chargebacks when using PubScale's dedicated SDKs. PubScale provides dedicated SDKs for [Android](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/android-integration) , [React Native](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/react-native) , and [Unity](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/unity) , which offer more secure and efficient integration methods. Please consider using these SDKs for better integration. [PreviousUnitychevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/unity) [NextServer-to-Server (S2S) Callback Configurationchevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/server-to-server-s2s-callback-configuration) Last updated 1 year ago * [1\. Integration](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/web-offerwall#id-1.-integration) * [1.1. Using an iframe:](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/web-offerwall#id-1.1.-using-an-iframe) * [1.2. Using a Direct Link:](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/web-offerwall#id-1.2.-using-a-direct-link) * [1.3. Using JavaScript:](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/web-offerwall#id-1.3.-using-javascript) * [2\. Setup Server-to-Server(S2S) callbacks](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/web-offerwall#id-3.-test-the-offerwall) * [3\. Test the OfferWall](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/web-offerwall#id-3.-test-the-offerwall-1) sun-brightdesktopmoon Copy Copy PubScale Offerwall Copy const appId = "your_app_id"; // Replace with your app ID const userId = "your_user_id"; // Replace with your unique user ID const offerwallUrl = `https://wow.pubscale.com?app_id=${appId}&user_id=${userId}`; window.open(offerwallUrl, '_blank'); sun-brightdesktopmoon --- # Start the OfferWall | 1.0.6-beta2 | Offerwall SDK To start the offerwall, just call, `OfferWall.launch(Context, OfferWallListener);` A listener can be set to listen for events fired by the Offer Wall. Kotlin Java Copy import com.pubscale.sdkone.offerwall.OfferWall import com.pubscale.sdkone.offerwall.models.OfferWallListener import com.pubscale.sdkone.offerwall.models.Reward .. .. .. val offerWallListener = object : OfferWallListener{ override fun onOfferWallShowed() { Log.d(TAG, "Offer wall showed.") } override fun onOfferWallClosed() { Log.d(TAG, "Offer wall closed.") } override fun onRewardClaimed(reward: Reward) { Log.d(TAG, "Offer wall reward claimed.") } override fun onFailed(message: String) { Log.d(TAG, "onFailed: $message") } } circle-info onRewardClaimed callback gives you the reward amount and currency details. To start the OfferWall, call the launch method of the OfferWall class. Kotlin Java [PreviousInitialize the SDKchevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/native-android/initialize-the-sdk) [NextSetting up the SDKchevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/react-native/setting-up-the-sdk) Last updated 2 years ago Copy import com.pubscale.sdkone.offerwall.OfferWall import com.pubscale.sdkone.offerwall.models.OfferWallListener import com.pubscale.sdkone.offerwall.models.Reward .. .. OfferWallListener offerWallListener = new OfferWallListener() { @Override public void onOfferWallShowed() { Log.d(TAG, "Offer wall showed."); } @Override public void onOfferWallClosed() { Log.d(TAG, "Offer wall closed."); } @Override public void onRewardClaimed(@NonNull Reward reward) { Log.d(TAG, "Offer wall reward claimed."); } @Override public void onFailed(@NonNull String message) { Log.d(TAG, "onFailed: " + message); } }; Copy import com.pubscale.sdkone.offerwall.OfferWall import com.pubscale.sdkone.offerwall.models.OfferWallListener .. .. OfferWall.launch(context, offerWallListener) Copy import com.pubscale.sdkone.offerwall.OfferWall import com.pubscale.sdkone.offerwall.models.OfferWallListener .. .. OfferWall.launch(context, offerWallListener); --- # Prerequisites | 1.0.6-beta2 | Offerwall SDK ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/prerequisites/prerequisites#before-starting-the-integration-make-a-quick-check-of-the-things-listed-below) Before starting the integration, make a quick check of the things listed below: 1. You have a [PubScale App ID](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/prerequisites/pubscale-onboarding) and you have created an offerwall placement 2. Ensure your application builds without any errors BEFORE adding the SDK [PreviousWelcome to PubScale Offerwall SDKchevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2) [NextPubScale Onboardingchevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/prerequisites/pubscale-onboarding) --- # Unity | 1.0.9 | Offerwall SDK circle-exclamation **Before you start** To set up the PubScale Offerwall, you’ll need to add your app to our platform. Follow this guide for instructions on [how to set up your app](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/setting-up-your-app) . Once completed, you will receive a unique 8-digit app ID. [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/unity#preintegration-checks) [✅ arrow-up-right](https://www.alt-codes.net/check-mark-symbols.php) Preintegration checks -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- * Make sure you are using Unity version 2019.4.0f1 or above * Ensure your application builds without any errors before adding the plugin. * Android platform is selected for your Unity project. * The Editor must support Android Gradle version 4.0.1 or above. [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/unity#id-1.-add-the-offerwall-unity-plugin-to-your-unity-project) **1\. Add the OfferWall Unity plugin to your Unity project** --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [Downloadarrow-up-right](https://github.com/GreedyGame/unity-offer_wall_plugin/releases/latest) and import the latest version of OfferWall Unity Plugin from GitHub. [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/unity#id-2.-configuring-publishing-settings) **2\. Configuring Publishing Settings** --------------------------------------------------------------------------------------------------------------------------------------------------------------------- * Set the minimum API level to 24 or above and the target API level to 33 or above under Edit/ProjectSettings/Player/Other Settings * Make sure you check the below-mentioned checkboxes under Edit/ProjectSettings/Player/Publishing Settings. * **Custom Main Manifest** * **Custom Main Gradle Template** * **Custom Gradle Settings Template** ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2F9dUUmbZ8oNwa2CoHqvab%2Fblobs%2FcdxTWMzbF9XwF5DrIqGX%2FScreenshot%25202024-05-09%2520at%25201.06.50%25E2%2580%25AFPM.png&width=768&dpr=3&quality=100&sign=5c388bcc&sv=2) Player > Publishing settings [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/unity#id-3.-configuring-dependencies) **3\. Configuring dependencies** ------------------------------------------------------------------------------------------------------------------------------------------------------- Adding `mavenCentral()` as a repository in `settingsTemplate.gradle` Add the below line inside the dependencies block in your mainTemplate.gradle file [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/unity#id-4.-force-resolve-dependencies) **4\. Force resolve dependencies** ----------------------------------------------------------------------------------------------------------------------------------------------------------- **Force resolve** forces the Package Manager to resolve the project’s packages, reinstalling any altered or missing package and removing extraneous packages. To Force resolve the dependencies, Goto Assets > External Dependency Manager > Android Resolver > Force Resolve (if the resolver did not open automatically) ![](https://pubscale.gitbook.io/~gitbook/image?url=https%3A%2F%2F3371507213-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FaUVG0uxfukyc5xCdlEhZ%252Fuploads%252FUzYUObvgE35BpwNoljLm%252Fimage.png%3Falt%3Dmedia%26token%3Dbd15261f-4718-4073-ae62-8839fe558896&width=768&dpr=4&quality=100&sign=c95a673969eca060eea708c9fdc31002608f810ed2f72bebef304fa7c837926b) Assets > External Dependency Manager > Android Resolver > Force Resolve circle-info OfferWall does not work in the Editor. Please use a real device to test the integration. [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/unity#id-1.-configuring-prefabs) 5\. Configuring Prefabs ----------------------------------------------------------------------------------------------------------------------------------------- #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/unity#drag-and-drop-pubscaleofferwallobject-prefab) **Drag and Drop** PubScaleOfferwallObject **prefab** Drag and drop the **PubScaleOfferwallObject prefab** from Assets/OfferWall/Prefab/PubScaleOfferwallObject.prefab in the scene. [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/unity#id-2.-configuring-app-key) 6\. Configuring App Key ----------------------------------------------------------------------------------------------------------------------------------------- Enter your PubScale app ID inside the "Pubscale App ID" field located on the PubScaleOfferwallObject. ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2F9dUUmbZ8oNwa2CoHqvab%2Fblobs%2FpBoMZ7udaVBFv4Ig63fa%2FScreenshot%25202024-05-09%2520at%25202.05.03%25E2%2580%25AFPM.png&width=768&dpr=3&quality=100&sign=4ab1a4fc&sv=2) Offerwall Prefab circle-info The PubScale App ID is an 8-digit identifier generated during the app creation process within the dashboard. If you need help creating an account/app with us, [click here](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/setting-up-your-app) . [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/unity#id-2.-configuring-app-key-1) 7\. Initialize the SDK ------------------------------------------------------------------------------------------------------------------------------------------ To launch the OfferWall, call the PubScaleOfferwallClient.Initialize(string userId) function using the instance from PubScaleOfferwallObject prefab. circle-info Expected params: 1. userID: A string value that is used to identify the user uniquely in your application. If this value is null, the SDK would internally create a userId for the device. [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/unity#id-2.-configuring-app-key-2) 8\. Custom loader background image and foreground image --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2F9dUUmbZ8oNwa2CoHqvab%2Fblobs%2FYnlfddXDB4jW040tGSTw%2FGroup%252078600.png&width=768&dpr=3&quality=100&sign=c17efd89&sv=2) #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/unity#step-1-custom-loader-background-and-loader-foreground) **Step 1: Custom loader background and loader foreground** To use custom background and foreground images for the loading screen replace the **demo\_background\_img and demo\_foreground\_img** file located under Assets/OfferWall/Resources with the image you need. #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/unity#step-2-enable-read-and-write-under-advance-image-settings) **Step 2: Enable Read and Write under Advance Image settings** Press the preset button on your imported image and then select the OfferWallTextureImporter preset from the menu and click apply. circle-info If the fields are left empty, the default values will be used: * Background: Black image * Foreground: App icon [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/unity#id-2.-configuring-app-key-3) 9\. Set Offerwall Orientation ------------------------------------------------------------------------------------------------------------------------------------------------- By default, the Offerwall opens in Portrait orientation. If you want to change this behaviour, do the following changes. Add the below line inside the tag in your AndroidManifest.xml file. [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/unity#id-2.-configuring-app-key-4) 10\. Handling the SDK callbacks (optional) -------------------------------------------------------------------------------------------------------------------------------------------------------------- To handle the SDK callbacks, subscribe to the events that are made available by the SimpleIntegration script. [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/unity#id-2.-configuring-app-key-5) 11\. Launch the OfferWall --------------------------------------------------------------------------------------------------------------------------------------------- To launch the OfferWall, call the AdvancedIntegration.ShowOfferWall() function using the PubScaleOfferwallAdvanced prefab. Can also be used in onClick of a button: ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2F9dUUmbZ8oNwa2CoHqvab%2Fblobs%2FST5Hyw2JdLMKSR9Gy8ZO%2FScreenshot%25202024-05-09%2520at%25202.09.42%25E2%2580%25AFPM.png&width=768&dpr=3&quality=100&sign=a3052f35&sv=2) Example usage: Launching Offerwall on click of a button [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/unity#id-3.-test-the-offerwall) 11\. Setup S2S callbacks ----------------------------------------------------------------------------------------------------------------------------------------- Setup the S2S callbacks to get instant updates whenever the user gets the reward. You can use this callback to reward the user in your application. [Learn more.](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/s2s-callback-configuration/ip-whitelist) [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/unity#id-3.-test-the-offerwall-1) 12\. Test the OfferWall ------------------------------------------------------------------------------------------------------------------------------------------ circle-info Please use the sandbox environment for testing purposes to get instant callbacks and rewards. To learn how to enable the Sandbox environment, [click here](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/sandbox-environment/sandbox-environment) . Finally, To test the offerwall, build the application to an actual device. Check if you can launch the Offerwall and get the appropriate callbacks. [PreviousReact Nativechevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/react-native) [NextWeb Offerwallchevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/web-offerwall) Last updated 1 year ago * [✅ Preintegration checks](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/unity#preintegration-checks) * [1\. Add the OfferWall Unity plugin to your Unity project](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/unity#id-1.-add-the-offerwall-unity-plugin-to-your-unity-project) * [2\. Configuring Publishing Settings](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/unity#id-2.-configuring-publishing-settings) * [3\. Configuring dependencies](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/unity#id-3.-configuring-dependencies) * [4\. Force resolve dependencies](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/unity#id-4.-force-resolve-dependencies) * [5\. Configuring Prefabs](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/unity#id-1.-configuring-prefabs) * [6\. Configuring App Key](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/unity#id-2.-configuring-app-key) * [7\. Initialize the SDK](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/unity#id-2.-configuring-app-key-1) * [8\. Custom loader background image and foreground image](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/unity#id-2.-configuring-app-key-2) * [9\. Set Offerwall Orientation](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/unity#id-2.-configuring-app-key-3) * [10\. Handling the SDK callbacks (optional)](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/unity#id-2.-configuring-app-key-4) * [11\. Launch the OfferWall](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/unity#id-2.-configuring-app-key-5) * [11\. Setup S2S callbacks](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/unity#id-3.-test-the-offerwall) * [12\. Test the OfferWall](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/unity#id-3.-test-the-offerwall-1) sun-brightdesktopmoon Copy pluginManagement { repositories { **ARTIFACTORYREPOSITORY** gradlePluginPortal() google() } } include ':launcher', ':unityLibrary' **INCLUDES** dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS) repositories { **ARTIFACTORYREPOSITORY** google() mavenCentral() //<----------------Add this line flatDir { dirs "${project(':unityLibrary').projectDir}/libs" } } } Copy implementation 'com.pubscale.sdkone:offerwall:1.0.9' Copy PubScaleOfferwallClient myScriptInstance = GetComponent(); // Check if the script instance is not null if (myScriptInstance != null) { myScriptInstance.InitOfferWall(userId); } Copy Copy //Define functions that would be called when the callbacks are given void OnSDKInitSuccess() { } void OnSDKInitFailed(string message) { } void OnOfferwallShowed() { } void OnOfferwallClosed() { } void OnRewardClaimed(Reward reward) { } void OnOfferwallFailed(string message) { } //Subscribe to the events PubScaleOfferwallClient.OnSDKInitSuccess += OnSDKInitSuccess; PubScaleOfferwallClient.OnSDKInitFailed += OnSDKInitFailed; PubScaleOfferwallClient.OnOfferwallShowed += OnOfferwallShowed; PubScaleOfferwallClient.OnOfferwallClosed += OnOfferwallClosed; PubScaleOfferwallClient.OnRewardClaimed += OnRewardClaimed; PubScaleOfferwallClient.OnOfferwallFailed += OnOfferwallFailed; Copy PubScaleOfferwallClient myScriptInstance = GetComponent(); // Check if the script instance is not null if (myScriptInstance != null) { myScriptInstance.ShowOfferWall(); } sun-brightdesktopmoon --- # Android Integration | 1.0.9 | Offerwall SDK circle-exclamation **Before you start** To set up the PubScale Offerwall, you’ll need to add your app to our platform. Follow this guide for instructions on [how to set up your app](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/setting-up-your-app) . Once completed, you will receive a unique 8-digit app ID. [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/android-integration#id-1.-add-this-to-your-build.gradle-file) 1\. Add this to your build.gradle file ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Add the below line inside the **dependencies** block in your build.gradle file. Once added, clean build and rebuild the project. Kotlin Script Groovy Copy implementation('com.pubscale.sdkone:offerwall:1.0.9') Copy implementation 'com.pubscale.sdkone:offerwall:1.0.9' [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/android-integration#id-2.-configure-proguard-rules) 2\. Configure proguard rules ----------------------------------------------------------------------------------------------------------------------------------------------------------------- For the SDK to work properly in release(obfuscated/minified) builds, add the following rules in your proguard-rules.pro file. proguard-rules.pro Copy -keep class com.pubscale.sdkone.offerwall.** {*;} -keep class com.pubscale.caterpillar.analytics.** {*;} #Supporting R8 full mode -keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation -keep,allowobfuscation,allowshrinking interface retrofit2.Call -keep,allowobfuscation,allowshrinking class retrofit2.Response [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/android-integration#id-3.-initializing-the-offerwall) 3\. Initializing the OfferWall --------------------------------------------------------------------------------------------------------------------------------------------------------------------- You must initialize the SDK before using the SDK. To do this, call `Offerwall.init(OfferWallConfig, OfferWallInitListener)` . ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/android-integration#id-3.1.-parameters-for-init-call) **3.1. Parameters for init call:** * **OfferWallConfig offerWallConfig:** An object to pass configuration-related info to the SDK while initializing. Refer below for how to create an object of OfferWallConfig. * **OfferWallInitListener offerWallInitListener:** A listener that informs you if the SDK initialization was successful or not. In case of failure, it will also give you a string stating the cause of the failure. This parameter is optional. ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/android-integration#id-3.2.-creating-offerwallconfig-object) **3.2. Creating OfferWallConfig object:** Create an instance of OfferWallConfig using the builder class OfferWallConfig.Builder by passing the context and your PubScale app ID. circle-info Obtain your **PubScale app ID** from the [PubScale Dashboardarrow-up-right](https://dashboard.pubscale.com/) by [adding your app and configuring the offerwall.](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/setting-up-your-app) Once completed, you will receive a unique 8-digit app ID. circle-info Use sandbox environment app ID for testing purposes. [Sandbox Environment](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/sandbox-environment/sandbox-environment) - Learn how to setup Sandbox environment Kotlin Java These are the public methods available for OfferWallConfig.Builder class: Public Methods Description setUniqueId(String uniqueId) Sets a unique id that will be used to identify the user uniquely. This will be sent back in the postback. setLoaderBackgroundBitmap(Bitmap bitmap) Accepts a bitmap and uses it as the background image for the loader and offerwall top banner. Default: Black color image setLoaderForegroundBitmap(Bitmap bitmap) Accepts a bitmap and uses it as the foreground image for the loader and offerwall top banner. Default: App icon setFullscreenEnabled(Boolean isEnabled) Sets if the offerwall should open in fullscreen mode or not. This can be used in apps or games where an immersive experience is needed. Default: false build() Builds the config and returns OfferWallConfig instance triangle-exclamation If a unique ID is not set, rewarding the user is not guaranteed. ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/android-integration#id-3.3.-making-the-init-call) **3.3. Making the init call:** Initialize the OfferWall SDK by calling the init function by passing the offer wall config. Kotlin Java circle-info OfferWallInitListener is an optional parameter in init() method. circle-info If you need to change any config after initializing the SDK, you should destroy and re-init the SDK. To destroy, call `OfferWall.destroy()` [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/android-integration#id-4.-start-the-offerwall) 4\. Start the OfferWall ------------------------------------------------------------------------------------------------------------------------------------------------------- To start the offerwall, just call, `OfferWall.launch(Context, OfferWallListener);` A listener can be set to listen for events fired by the Offer Wall. Kotlin Java circle-info onRewardClaimed callback gives you the reward amount and currency details. To start the OfferWall, call the launch method of the OfferWall class. Kotlin Java [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/android-integration#id-3.-test-the-offerwall) 5\. Setup S2S callbacks ------------------------------------------------------------------------------------------------------------------------------------------------------ Setup the S2S callbacks to get instant updates whenever the user gets the reward. You can use this callback to reward the user in your application. [Learn more.](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/s2s-callback-configuration/ip-whitelist) [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/android-integration#id-3.-test-the-offerwall-1) 6\. Test the OfferWall ------------------------------------------------------------------------------------------------------------------------------------------------------- circle-info Please use the sandbox environment for testing purposes to get instant callbacks and rewards. To learn how to enable the Sandbox environment, [click here](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/sandbox-environment/sandbox-environment) . Finally, To test the offerwall, build the application to an actual device. Check if you can launch the Offerwall and get the appropriate callbacks. [PreviousSetting up your appchevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/setting-up-your-app) [NextReact Nativechevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/react-native) Last updated 1 year ago * [1\. Add this to your build.gradle file](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/android-integration#id-1.-add-this-to-your-build.gradle-file) * [2\. Configure proguard rules](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/android-integration#id-2.-configure-proguard-rules) * [3\. Initializing the OfferWall](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/android-integration#id-3.-initializing-the-offerwall) * [3.1. Parameters for init call:](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/android-integration#id-3.1.-parameters-for-init-call) * [3.2. Creating OfferWallConfig object:](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/android-integration#id-3.2.-creating-offerwallconfig-object) * [3.3. Making the init call:](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/android-integration#id-3.3.-making-the-init-call) * [4\. Start the OfferWall](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/android-integration#id-4.-start-the-offerwall) * [5\. Setup S2S callbacks](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/android-integration#id-3.-test-the-offerwall) * [6\. Test the OfferWall](https://pubscale.gitbook.io/offerwall-sdk/1.0.9/basic-integration/android-integration#id-3.-test-the-offerwall-1) sun-brightdesktopmoon Copy import com.pubscale.sdkone.offerwall.OfferWallConfig .. .. val offerWallConfig = OfferWallConfig.Builder(context, "YOUR_PUBSCALE_APP_ID") .setUniqueId("unique_id") //optional, used to represent the user of your application .setLoaderBackgroundBitmap(backgroundBitmap) //optional .setLoaderForegroundBitmap(foreground) //optional .setFullscreenEnabled(false) //optional .build() Copy import com.pubscale.sdkone.offerwall.OfferWallConfig .. .. OfferWallConfig offerWallConfig = new OfferWallConfig.Builder(context, "YOUR_PUBSCALE_APP_ID") .setUniqueId("unique_id") //optional, used to represent the user of your application .setLoaderBackgroundBitmap(backgroundBitmap)//optional .setLoaderForegroundBitmap(foregroundBitmap)//optional .setFullscreenEnabled(false)//optional .build(); Copy OfferWall.init(offerWallConfig, object : OfferWallInitListener { override fun onInitSuccess() { } override fun onInitFailed(error: InitError) { } }) Copy OfferWall.init(offerWallConfig, new OfferWallInitListener() { @Override public void onInitSuccess() { } @Override public void onInitFailed(@NonNull InitError error) { } }); Copy import com.pubscale.sdkone.offerwall.OfferWall import com.pubscale.sdkone.offerwall.models.OfferWallListener import com.pubscale.sdkone.offerwall.models.Reward .. .. .. val offerWallListener = object : OfferWallListener{ override fun onOfferWallShowed() { Log.d(TAG, "Offer wall showed.") } override fun onOfferWallClosed() { Log.d(TAG, "Offer wall closed.") } override fun onRewardClaimed(reward: Reward) { Log.d(TAG, "Offer wall reward claimed.") } override fun onFailed(message: String) { Log.d(TAG, "onFailed: $message") } } Copy import com.pubscale.sdkone.offerwall.OfferWall import com.pubscale.sdkone.offerwall.models.OfferWallListener import com.pubscale.sdkone.offerwall.models.Reward .. .. OfferWallListener offerWallListener = new OfferWallListener() { @Override public void onOfferWallShowed() { Log.d(TAG, "Offer wall showed."); } @Override public void onOfferWallClosed() { Log.d(TAG, "Offer wall closed."); } @Override public void onRewardClaimed(@NonNull Reward reward) { Log.d(TAG, "Offer wall reward claimed."); } @Override public void onFailed(@NonNull String message) { Log.d(TAG, "onFailed: " + message); } }; Copy import com.pubscale.sdkone.offerwall.OfferWall import com.pubscale.sdkone.offerwall.models.OfferWallListener .. .. OfferWall.launch(context, offerWallListener) Copy import com.pubscale.sdkone.offerwall.OfferWall import com.pubscale.sdkone.offerwall.models.OfferWallListener .. .. OfferWall.launch(context, offerWallListener); sun-brightdesktopmoon --- # S2S Callback Configuration | 1.0.6-beta1 | Offerwall SDK You can configure the S2S callback for the offerwall in the dashboard inside the Offerwall's overview section. ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1/s2s-callback-configuration/s2s-callback-configuration#id-1.-setup-callback-url) 1\. Setup Callback URL When a user has earned a reward by completing an offer, we fire an HTTP GET request to the provided callback URL. The following query parameters will be part of the request. Copy ?user_id=&value=&token=&signature= //Example http://www.example.com/payments/offers/pubscale?user_id=&value=&token=&signature= Query Params Description user\_id The 'unique\_id' set while initializing the SDK. value The decimal value of the reward earned by the user. token A token that uniquely represents the transaction. signature Hash of the above values to verify the request (more info below). ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1/s2s-callback-configuration/s2s-callback-configuration#id-2.-server-response) 2\. Server Response Responding to the callback URL with status codes between and including the values 200 to 299 will mark the callback as successfully delivered. In the event of the server not responding with any of the aforementioned status codes, the request will be **retried 6 times** at different intervals. You can utilize the unique token sent in the request to avoid rewarding the user multiple times for the same callback. ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1/s2s-callback-configuration/s2s-callback-configuration#id-3.-optional-parameters-for-fraud-detection-prevention) 3\. Optional Parameters for fraud detection/prevention The value sent in the signature parameter can be used to validate the identity of the origin of the request. The value is an MD5 hash of the template below. The secret key is an additional key that will be provided along with the APP API KEY. Golang NodeJs Python PHP #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1/s2s-callback-configuration/s2s-callback-configuration#example) Example secret\_key = `fa072672-d432-11c4-885a-EB1CdEc4Bb13` user\_id = `30356439-8d15-4f47-B133-010a37C19eBD` value = `100.1234` token = `525a5B8e-512b-441A-a10B-72d218c370e5` Final format = `fa072672-d432-11c4-885a-EB1CdEc4Bb13.30356439-8d15-4f47-B133-010a37C19eBD.100.525a5B8e-512b-441A-a10B-72d218c370e5` #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1/s2s-callback-configuration/s2s-callback-configuration#steps-to-validate-the-value-of-the-hash) Steps to validate the value of the hash 1. Concatenate the values in the above format. 2. Make sure to convert the value parameter from decimal to integer. 3. Calculate the MD5 hash of the concatenated value. 4. Build Hex encode of the generated value. 5. Verify if the calculated value is equal to the value sent in the signature parameter. circle-info As the value of the secret key will only be known to you and PubScale’s server, the hash cannot be generated by a fraudulent third party. [PreviousStart the OfferWallchevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1/react-native/start-the-offerwall) [NextSandbox Environmentchevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1/sandbox-environment/sandbox-environment) Last updated 2 years ago * [1\. Setup Callback URL](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1/s2s-callback-configuration/s2s-callback-configuration#id-1.-setup-callback-url) * [2\. Server Response](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1/s2s-callback-configuration/s2s-callback-configuration#id-2.-server-response) * [3\. Optional Parameters for fraud detection/prevention](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta1/s2s-callback-configuration/s2s-callback-configuration#id-3.-optional-parameters-for-fraud-detection-prevention) Copy template := fmt.Sprintf("%s.%s.%d.%s", , , ), ) hash := toMD5(template) if hash != {signature} { return errors.New("invalid signature") } func toMD5(text string) string { algorithm := md5.New() algorithm.Write([]byte(text)) return hex.EncodeToString(algorithm.Sum(nil)) } Copy const md5 = require('md5') const template = `${}.${}.${Math.trunc()}.${}` const hash = md5(template) if(signature != hash) { return false } Copy import hashlib template = '{secret_key}.{user_id}.{value}.{token}'.format(secret_key=,user_id=,value=int(),token=) hash = hashlib.md5(template.encode('utf-8')).hexdigest() if hash != : return false Copy function calculateHash() { $user = $_GET['user_id']; $token = $_GET['token']; $value = $_GET['value']; $template = . "." . $user . "." . (int)$value . "." $token; return calculateMD5($template); } function calculateMD5($data) { return hash('md5', $data); } $hash = $_GET['signature']; if ($hash != calculateHash()) { return false } --- # iOS | 1.0.10 | Offerwall SDK [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/ios#id-1.-integration) 1\. Integration ------------------------------------------------------------------------------------------------------------------------ circle-exclamation **Before you start** To set up the PubScale Offerwall, you’ll need to add your app to our platform. Follow this guide for instructions on [how to set up your app](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/setting-up-your-app) . Once completed, you will receive a unique 8-digit app ID. ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2FwtFu5cQcg9ZXDSngP2aN%2Fblobs%2FLswXTxEAv7IAMykYqwhk%2FWow_flow%2520%281%29.png&width=768&dpr=3&quality=100&sign=16bc2268&sv=2)![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2FwtFu5cQcg9ZXDSngP2aN%2Fblobs%2FpZAkfHGAYoKlDM5kK29m%2Fwow_flow_dark.png&width=768&dpr=3&quality=100&sign=5b3f2fe3&sv=2) To integrate the PubScale Offerwall, you need to construct a URL and provide a set of parameters for proper configuration. **Construct the Offerwall URL** **Parameters** Parameters Description **app\_id** (Required) This is the unique identifier for your app, required for integration. **user\_id** (Required) A unique identifier for each user, required to track their activity on the offerwall. We recommend using a UUID as the user\_id. **idfa** (Optional but Recommended) For iOS integrations Include the **idfa** as a parameter when launching the Offerwall. This helps enhance tracking accuracy and plays a key role in fraud prevention. To integrate the PubScale Offerwall into your iOS App, you have the following options: ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/ios#using-sfsafariviewcontroller) Using SFSafariViewController: For optimal performance and user experience, we recommend launching the Offerwall using `SFSafariViewController` Here's a simple Swift example that opens PubScale Offerwall in a `SFSafariViewController` on iOS #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/ios#notes) Notes: * This code should be placed in a `UIViewController` subclass. * You can call `openLinkInSafariViewController()` when appropriate (e.g., on a button tap or in `viewDidLoad` as shown). * Don't forget to import `SafariServices`. * Don't forget to replace the {app\_id} ,{user\_id} and {idfa} with the actula value. * If your App is not approved from PubScale you might see an error page. ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2F4253310960-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FwtFu5cQcg9ZXDSngP2aN%252Fuploads%252FBWTxceAkaguCV1zQT6eh%252FScreenshot%25202025-04-23%2520at%25205.19.10%25E2%2580%25AFPM.png%3Falt%3Dmedia%26token%3D81670fb8-3f35-4cf0-8e53-69d5c7a09049&width=300&dpr=3&quality=100&sign=deef8c01&sv=2) If you see this error, * Check your App ID and make sure it is correct. * If your App ID is correct then its possible your App ID is not approved yet, in that case please reach out to your Account Manager to get your App approved. If your configuration is correct, you will see a page similar to the screenshot below. ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2F4253310960-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FwtFu5cQcg9ZXDSngP2aN%252Fuploads%252FtgqerDOl95wNtqKZd9FB%252FScreenshot%25202025-04-23%2520at%25205.30.08%25E2%2580%25AFPM.png%3Falt%3Dmedia%26token%3D0b19efdf-2b9a-4c24-b364-98a0f0f12d48&width=300&dpr=3&quality=100&sign=b649add7&sv=2) [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/ios#id-3.-test-the-offerwall) 2\. Setup Server-to-Server(S2S) callbacks --------------------------------------------------------------------------------------------------------------------------------------------------------- Set up the Server-to-Server (S2S) callbacks to receive instant updates whenever a user completes an offer and earns a reward. When an offer is completed, our server will send a notification to the configured callback URL. This callback provides the necessary information to process and verify the reward for the user in your application. [Learn more.](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/server-to-server-s2s-callback-configuration) [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/ios#id-3.-test-the-offerwall-1) 3\. Test the OfferWall ---------------------------------------------------------------------------------------------------------------------------------------- circle-info Please use the sandbox environment for testing purposes to get instant callbacks and rewards. To learn how to enable the Sandbox environment, [click here](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/sandbox-environment/sandbox-environment) . To ensure your OfferWall integration is working perfectly, follow these steps during the testing phase. * Open the offerwall and verify that all offers are displayed correctly. * Complete an offer and confirm that a callback is received from PubScale server to your server. For the sandbox environment, ensure the callback URL is configured properly to receive sandbox callbacks. * Ensure the hashing technique used matches the one specified in the documentation. * Verify that the reward value received matches the value displayed for the offer. * Confirm that the callback is received only from PubScale's [whitelisted server IPs](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/s2s-callback-configuration/ip-whitelist) . [PreviousWebchevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/web) [NextAPIchevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/api) Last updated 10 months ago * [1\. Integration](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/ios#id-1.-integration) * [Using SFSafariViewController:](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/ios#using-sfsafariviewcontroller) * [2\. Setup Server-to-Server(S2S) callbacks](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/ios#id-3.-test-the-offerwall) * [3\. Test the OfferWall](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/ios#id-3.-test-the-offerwall-1) sun-brightdesktopmoon Copy https://wow.pubscale.com?app_id={app_id}&user_id={user_id}&idfa={idfa} Copy import UIKit import SafariServices class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() openLinkInSafariViewController() } func openLinkInSafariViewController() { if let url = URL(string: "https://wow.pubscale.com?app_id={app_id}&user_id={user_id}&idfa={idfa}") { let safariVC = SFSafariViewController(url: url) safariVC.modalPresentationStyle = .formSheet present(safariVC, animated: true, completion: nil) } else { print("Invalid URL") } } } sun-brightdesktopmoon --- # IP Whitelist | 1.0.6-beta2 | Offerwall SDK You can restrict the callbacks to be accepted only from our sever IP address(es). Please whitelist the following IP(s) and regularly check back to find possible changes Copy 34.100.236.68 //Last updated at: Jan 23, 2024 [PreviousS2S Callback Configurationchevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/s2s-callback-configuration/s2s-callback-configuration) [NextSandbox Environmentchevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/sandbox-environment/sandbox-environment) Last updated 2 years ago --- # Start the OfferWall | 1.0.6-beta2 | Offerwall SDK To start the offerwall, just call, `PubscaleOfferwall.launch()` method. Copy PubscaleOfferwall.launch(() => { console.log("close"); //onClose }, (errMsg) => { console.log(errMsg); //onFailure }); [PreviousInitialize the SDKchevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/react-native/initialize-the-sdk) [NextS2S Callback Configurationchevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/s2s-callback-configuration/s2s-callback-configuration) --- # Setting up the SDK | 1.0.6-beta2 | Offerwall SDK #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/native-android/setting-up-the-sdk#id-1.-add-this-to-your-build.gradle-file) 1\. Add this to your build.gradle file Add the below line inside the **dependencies** block in your build.gradle file Kotlin Script Groovy Copy implementation('com.pubscale.sdkone:offerwall:1.0.6-beta2') Copy implementation 'com.pubscale.sdkone:offerwall:1.0.6-beta2' #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/native-android/setting-up-the-sdk#id-2.-clean-build-and-rebuild-the-project) 2\. Clean build and Rebuild the project #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/native-android/setting-up-the-sdk#id-3.-configure-proguard-rules) 3\. Configure proguard rules For the SDK to work properly in release(obfuscated/minified) builds, add the following rules in your proguard-rules.pro file. proguard-rules.pro Copy -keep class com.pubscale.sdkone.offerwall.** {*;} -keep class com.pubscale.caterpillar.analytics.** {*;} #Supporting R8 full mode -keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation -keep,allowobfuscation,allowshrinking interface retrofit2.Call -keep,allowobfuscation,allowshrinking class retrofit2.Response We have added the SDK to the project. Learn how to initialize the SDK in the next step [PreviousPubScale Onboardingchevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/prerequisites/pubscale-onboarding) [NextInitialize the SDKchevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/native-android/initialize-the-sdk) Last updated 2 years ago --- # Setting up your app | 1.0.10 | Offerwall SDK ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/setting-up-your-app#id-1.-create-an-account) 1\. Create an account Create an account with PubScale through the dashboard at [https://dashboard.pubscale.comarrow-up-right](https://dashboard.pubscale.com/) ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/setting-up-your-app#id-2.-creating-an-offerwall-unit) 2\. Creating an Offerwall Unit Once you have signed in, you can access Offerwall from the side navigation list. 1. Click on the **Offerwall** item on the navigation list ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2FwtFu5cQcg9ZXDSngP2aN%2Fblobs%2FowcQS6t4xtFB22AF6w1h%2FGroup%252078578.png&width=768&dpr=3&quality=100&sign=e14ae4a0&sv=2) 1. Next, create an Offerwall placement for the app by clicking on the **Create Offerwall** button and create the offerwall unit by providing the required details and config. ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2FwtFu5cQcg9ZXDSngP2aN%2Fblobs%2Fi95iqP4oFRElNW5IyxRK%2FGroup%252078579.png&width=768&dpr=3&quality=100&sign=6a819409&sv=2) 1. Once you’ve created your app in the dashboard and selected the desired integration type (Android SDK, Web Integration, or API), your app will enter a **Pending Approval** state. circle-exclamation The approval process is **asynchronous** and typically takes **up to 72 hours** as our team manually reviews each submission. This **does not block your integration** process. We strongly recommend proceeding with the integration immediately. You can use **sandbox mode** to view and test offers while your app is pending approval. Please make sure to follow the **integration checklist** to ensure you don’t miss any required steps before going live. Once the app is approved, it may take up to 5 minutes for all changes to fully propagate. If you encounter any errors, please wait for 5 minutes after receiving the approval confirmation. ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/setting-up-your-app#id-3.-before-you-go-live) 3\. Before you go live You can find the checklist by clicking on the **Integration Steps** card ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2F4253310960-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FwtFu5cQcg9ZXDSngP2aN%252Fuploads%252FVtWo3URr4olGTGq7nhM4%252FScreenshot%25202025-05-21%2520at%252012.55.22%25E2%2580%25AFPM.png%3Falt%3Dmedia%26token%3Daba522d1-0c76-45b8-b386-13c40101e958&width=768&dpr=3&quality=100&sign=89ce2951&sv=2) Please make sure you have completed all the steps in the checklist and mark it as completed. ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2F4253310960-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FwtFu5cQcg9ZXDSngP2aN%252Fuploads%252FCFRw8DRzK9hYYc5lGtCT%252FScreenshot%25202025-05-21%2520at%252012.55.30%25E2%2580%25AFPM.png%3Falt%3Dmedia%26token%3D3334727f-bc92-44d9-97aa-ececc4441722&width=768&dpr=3&quality=100&sign=733bcb67&sv=2) [PreviousWelcome to PubScale Offerwall SDKchevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.10) [NextAndroid Integrationchevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/android-integration) Last updated 10 months ago * [1\. Create an account](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/setting-up-your-app#id-1.-create-an-account) * [2\. Creating an Offerwall Unit](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/setting-up-your-app#id-2.-creating-an-offerwall-unit) * [3\. Before you go live](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/setting-up-your-app#id-3.-before-you-go-live) sun-brightdesktopmoon sun-brightdesktopmoon --- # Sandbox Environment | 1.0.6-beta2 | Offerwall SDK Sandbox environment enables you to test out the integration before you release your app. You will be able to test the complete integration starting from initializing the SDK to getting callbacks. Also, any changes in the sandbox environment do not affect the production environment. 1. **Switch to the sandbox environment using the toggle in the dashboard** circle-info Switching to the Sandbox environment in the dashboard does not affect your production environment. ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2F47uqFPZw7HlLBl2j2OyM%2Fblobs%2FPS6FBUhu1PWYHkoFILyh%2FGroup%252078582.png&width=768&dpr=3&quality=100&sign=4ba5a012&sv=2) Sandbox Environment toggle 1. **Copy the app ID shown for the sandbox environment and use it in the app** 2. **Additionally, you can also configure a different S2S callback for your sandbox environment by clicking on the Configure Callback button in the sandbox environment.** [PreviousIP Whitelistchevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/s2s-callback-configuration/ip-whitelist) [NextSampleschevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/samples) Last updated 2 years ago --- # Initialize the SDK | 1.0.6-beta2 | Offerwall SDK You must initialize the SDK before using the SDK. To do this, call `Offerwall.init(OfferWallConfig, OfferWallInitListener)` . Parameters for init call: * **OfferWallConfig offerWallConfig:** An object to pass configuration-related info to the SDK while initializing. Refer below for how to create an object of OfferWallConfig. * **OfferWallInitListener offerWallInitListener:** A listener that informs you if the SDK initialization was successful or not. In case of failure, it will also give you a string stating the cause of the failure. This parameter is optional. ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/native-android/initialize-the-sdk#creating-offerwallconfig-object) **Creating OfferWallConfig object:** Create an instance of OfferWallConfig using the builder class OfferWallConfig.Builder by passing the context and your PubScale app ID. circle-info Use sandbox environment app ID for testing purposes. [Sandbox Environment](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/sandbox-environment/sandbox-environment) - Learn how to setup Sandbox environment Kotlin Java Copy import com.pubscale.sdkone.offerwall.OfferWallConfig .. .. val offerWallConfig = OfferWallConfig.Builder(context, "YOUR_PUBSCALE_APP_ID") .setUniqueId("unique_id") //optional, used to represent the user of your application .setLoaderBackgroundBitmap(backgroundBitmap) //optional .setLoaderForegroundBitmap(foreground) //optional .setFullscreenEnabled(false) //optional .build() Copy import com.pubscale.sdkone.offerwall.OfferWallConfig .. .. OfferWallConfig offerWallConfig = new OfferWallConfig.Builder(context, "YOUR_PUBSCALE_APP_ID") .setUniqueId("unique_id") //optional, used to represent the user of your application .setLoaderBackgroundBitmap(backgroundBitmap)//optional .setLoaderForegroundBitmap(foregroundBitmap)//optional .setFullscreenEnabled(false)//optional .build(); These are the public methods available for OfferWallConfig.Builder class: Public Methods Description setUniqueId(String uniqueId) Sets a unique id that will be used to identify the user uniquely. This will be sent back in the postback. setFullscreenEnabled(Boolean isEnabled) Sets if the offerwall should open in fullscreen mode or not. Default: false setLoaderBackgroundBitmap(Bitmap bitmap) Accepts a bitmap and uses it as the background image for the loader and offerwall top banner. Default: Black color image setLoaderForegroundBitmap(Bitmap bitmap) Accepts a bitmap and uses it as the foreground image for the loader and offerwall top banner. Default: App icon build() Builds the config and returns OfferWallConfig instance triangle-exclamation If a unique ID is not set, rewarding the user is not guaranteed. ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/native-android/initialize-the-sdk#undefined-1) ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/native-android/initialize-the-sdk#initialize-the-offerwall-sdk) **Initialize the Offerwall SDK:** Initialize the OfferWall SDK by calling the init function by passing the offer wall config. Kotlin Java circle-info OfferWallInitListener is an optional parameter in init() method. circle-info If you need to change any config after initializing the SDK, you should destroy and re-init the SDK. To destroy, call `OfferWall.destroy()` [PreviousSetting up the SDKchevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/native-android/setting-up-the-sdk) [NextStart the OfferWallchevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/native-android/start-the-offerwall) Last updated 2 years ago * [Creating OfferWallConfig object:](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/native-android/initialize-the-sdk#creating-offerwallconfig-object) * [](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/native-android/initialize-the-sdk#undefined-1) * [Initialize the Offerwall SDK:](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/native-android/initialize-the-sdk#initialize-the-offerwall-sdk) Copy OfferWall.init(offerWallConfig, object : OfferWallInitListener { override fun onInitSuccess() { } override fun onInitFailed(error: InitError) { } }) Copy OfferWall.init(offerWallConfig, new OfferWallInitListener() { @Override public void onInitSuccess() { } @Override public void onInitFailed(@NonNull InitError error) { } }); --- # React Native | 1.0.10 | Offerwall SDK circle-exclamation **Before you start** To set up the PubScale Offerwall, you’ll need to add your app to our platform. Follow this guide for instructions on [how to set up your app](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/setting-up-your-app) . Once completed, you will receive a unique 8-digit app ID. [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/react-native#id-1.-add-this-to-your-build.gradle-file) 1\. Add this to your build.gradle file ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Add the below line inside the **dependencies** block in your build.gradle file Kotlin Script Groovy Copy implementation('com.pubscale.sdkone:offerwall:1.0.10') Copy implementation 'com.pubscale.sdkone:offerwall:1.0.10' [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/react-native#id-2.-configure-proguard-rules) 2\. Configure proguard rules ----------------------------------------------------------------------------------------------------------------------------------------------------------- For the SDK to work properly in release(obfuscated/minified) builds, add the following rules in your proguard-rules.pro file. proguard-rules.pro Copy -keep class com.pubscale.sdkone.offerwall.** {*;} -keep class com.pubscale.caterpillar.analytics.** {*;} #Supporting R8 full mode -keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation -keep,allowobfuscation,allowshrinking interface retrofit2.Call -keep,allowobfuscation,allowshrinking class retrofit2.Response We have added the SDK to the project. Learn how to initialize the SDK in the next step [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/react-native#id-3.-add-native-module-files) 3\. Add native module files --------------------------------------------------------------------------------------------------------------------------------------------------------- Add the following files to your android app's module directory. * [PubscaleOfferwallSdkModule.javaarrow-up-right](https://storage.googleapis.com/pubscale-offerwall/lib/PubscaleOfferwallSdkModule.java) * [PubscaleOfferwallSdkPackage.javaarrow-up-right](https://storage.googleapis.com/pubscale-offerwall/lib/PubscaleOfferwallSdkPackage.java) ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/react-native#id-3.1.-link-the-module) 3.1. Link the module Add the following line inside the getPackages() method of MainApplication class. `packages.add(new PubscaleOfferwallSdkPackage());` ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2FwtFu5cQcg9ZXDSngP2aN%2Fblobs%2FyOsGnn7xvrwAZswYQNh1%2Fimage.png&width=768&dpr=3&quality=100&sign=77cf04c&sv=2) Adding PubscaleOfferwallSdkPackage to React packages [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/react-native#id-4.-initialize-the-sdk) 4\. Initialize the SDK ----------------------------------------------------------------------------------------------------------------------------------------------- To initialize the SDK, call the PubscaleOfferwall.init() method. Pass the app\_id (generated from the console) as the first parameter of the init method. Make sure to call the init method as soon as your app starts up, ideally in app.js or index.js. circle-info Obtain your **app\_id** from the [PubScale Dashboardarrow-up-right](https://dashboard.pubscale.com/) by [adding your app and configuring the offerwall.](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/setting-up-your-app) Once completed, you will receive a unique 8-digit app ID. #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/react-native#optional-parameters) Optional Parameters: Parameter Description **user\_id** Pass your user's id in this field to tag your user. This id will be sent along with the S2S callback. Make sure to call the init function every time the user id changes. **background\_Base64** An image that will be displayed as a banner on top of the offer wall. Pass the image in base64 encoded format. The background will be black by default. **appicon\_Base64** An image that will be displayed in the center on the top banner of the offerwall. Pass the image in base64 encoded format. Default value is the app icon. ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/react-native#id-4.1.-making-the-init-call) 4.1. Making the Init call circle-info Use sandbox environment app ID for testing purposes. [Sandbox Environment](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/sandbox-environment/sandbox-environment) - Learn how to setup Sandbox environment [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/react-native#id-5.-start-the-offerwall) 5\. Start the OfferWall ------------------------------------------------------------------------------------------------------------------------------------------------- To start the offerwall, just call, `PubscaleOfferwall.launch()` method. [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/react-native#id-3.-test-the-offerwall) 6\. Setup S2S callbacks ------------------------------------------------------------------------------------------------------------------------------------------------ Setup the S2S callbacks to get instant updates whenever the user gets the reward. You can use this callback to reward the user in your application. [Learn more.](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/s2s-callback-configuration/ip-whitelist) [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/react-native#id-3.-test-the-offerwall-1) 7\. Test the OfferWall ------------------------------------------------------------------------------------------------------------------------------------------------- circle-info Please use the sandbox environment for testing purposes to get instant callbacks and rewards. To learn how to enable the Sandbox environment, [click here](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/sandbox-environment/sandbox-environment) . Finally, To test the offerwall, build the application to an actual device. Check if you can launch the Offerwall and get the appropriate callbacks. [PreviousAndroid Integrationchevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/android-integration) [NextUnitychevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/unity) Last updated 11 months ago * [1\. Add this to your build.gradle file](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/react-native#id-1.-add-this-to-your-build.gradle-file) * [2\. Configure proguard rules](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/react-native#id-2.-configure-proguard-rules) * [3\. Add native module files](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/react-native#id-3.-add-native-module-files) * [3.1. Link the module](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/react-native#id-3.1.-link-the-module) * [4\. Initialize the SDK](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/react-native#id-4.-initialize-the-sdk) * [4.1. Making the Init call](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/react-native#id-4.1.-making-the-init-call) * [5\. Start the OfferWall](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/react-native#id-5.-start-the-offerwall) * [6\. Setup S2S callbacks](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/react-native#id-3.-test-the-offerwall) * [7\. Test the OfferWall](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/react-native#id-3.-test-the-offerwall-1) sun-brightdesktopmoon Copy import {NativeModules, Alert} from 'react-native'; const {PubscaleOfferwall} = NativeModules; //initialises the SDK. //call init once the user is logged in. PubscaleOfferwall.init( "app_id", { "user_id": "test-user", //optional, but require to tag user to offer completion. "background_Base64": base64Image, "appicon_Base64": app64Image, //optional }, () => { //onSuccess Callback console.log("success") }, (errMsg)=>{ //onFailure Callbacks console.log(errMsg) }) Copy PubscaleOfferwall.launch(() => { console.log("close"); //onClose }, (errMsg) => { console.log(errMsg); //onFailure }); sun-brightdesktopmoon --- # S2S Callback Configuration | 1.0.6-beta2 | Offerwall SDK You can configure the S2S callback for the offerwall in the dashboard inside the Offerwall's overview section. ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/s2s-callback-configuration/s2s-callback-configuration#id-1.-setup-callback-url) 1\. Setup Callback URL When a user has earned a reward by completing an offer, we fire an HTTP GET request to the provided callback URL. The following query parameters will be part of the request. Copy ?user_id=&value=&token=&signature= //Example http://www.example.com/payments/offers/pubscale?user_id=&value=&token=&signature= Query Params Description user\_id The 'unique\_id' set while initializing the SDK. value The decimal value of the reward earned by the user. token A token that uniquely represents the transaction. signature Hash of the above values to verify the request (more info below). ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/s2s-callback-configuration/s2s-callback-configuration#id-2.-server-response) 2\. Server Response Responding to the callback URL with status codes between and including the values 200 to 299 will mark the callback as successfully delivered. In the event of the server not responding with any of the aforementioned status codes, the request will be **retried 6 times** at different intervals. You can utilize the unique token sent in the request to avoid rewarding the user multiple times for the same callback. ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/s2s-callback-configuration/s2s-callback-configuration#id-3.-optional-parameters-for-fraud-detection-prevention) 3\. Optional Parameters for fraud detection/prevention The value sent in the signature parameter can be used to validate the identity of the origin of the request. The value is an MD5 hash of the template below. The secret key is an additional key that will be provided along with the APP API KEY. Golang NodeJs Python PHP #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/s2s-callback-configuration/s2s-callback-configuration#example) Example secret\_key = `fa072672-d432-11c4-885a-EB1CdEc4Bb13` user\_id = `30356439-8d15-4f47-B133-010a37C19eBD` value = `100.1234` token = `525a5B8e-512b-441A-a10B-72d218c370e5` Final format = `fa072672-d432-11c4-885a-EB1CdEc4Bb13.30356439-8d15-4f47-B133-010a37C19eBD.100.525a5B8e-512b-441A-a10B-72d218c370e5` #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/s2s-callback-configuration/s2s-callback-configuration#steps-to-validate-the-value-of-the-hash) Steps to validate the value of the hash 1. Concatenate the values in the above format. 2. Make sure to convert the value parameter from decimal to integer. 3. Calculate the MD5 hash of the concatenated value. 4. Build Hex encode of the generated value. 5. Verify if the calculated value is equal to the value sent in the signature parameter. circle-info As the value of the secret key will only be known to you and PubScale’s server, the hash cannot be generated by a fraudulent third party. [PreviousStart the OfferWallchevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/react-native/start-the-offerwall) [NextIP Whitelistchevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/s2s-callback-configuration/ip-whitelist) Last updated 2 years ago * [1\. Setup Callback URL](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/s2s-callback-configuration/s2s-callback-configuration#id-1.-setup-callback-url) * [2\. Server Response](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/s2s-callback-configuration/s2s-callback-configuration#id-2.-server-response) * [3\. Optional Parameters for fraud detection/prevention](https://pubscale.gitbook.io/offerwall-sdk/1.0.6-beta2/s2s-callback-configuration/s2s-callback-configuration#id-3.-optional-parameters-for-fraud-detection-prevention) Copy template := fmt.Sprintf("%s.%s.%d.%s", , , ), ) hash := toMD5(template) if hash != {signature} { return errors.New("invalid signature") } func toMD5(text string) string { algorithm := md5.New() algorithm.Write([]byte(text)) return hex.EncodeToString(algorithm.Sum(nil)) } Copy const md5 = require('md5') const template = `${}.${}.${Math.trunc()}.${}` const hash = md5(template) if(signature != hash) { return false } Copy import hashlib template = '{secret_key}.{user_id}.{value}.{token}'.format(secret_key=,user_id=,value=int(),token=) hash = hashlib.md5(template.encode('utf-8')).hexdigest() if hash != : return false Copy function calculateHash() { $user = $_GET['user_id']; $token = $_GET['token']; $value = $_GET['value']; $template = . "." . $user . "." . (int)$value . "." $token; return calculateMD5($template); } function calculateMD5($data) { return hash('md5', $data); } $hash = $_GET['signature']; if ($hash != calculateHash()) { return false } --- # Web | 1.0.10 | Offerwall SDK [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/web#id-1.-integration) 1\. Integration ------------------------------------------------------------------------------------------------------------------------ circle-exclamation **Before you start** To set up the PubScale Offerwall, you’ll need to add your app to our platform. Follow this guide for instructions on [how to set up your app](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/setting-up-your-app) . Once completed, you will receive a unique 8-digit app ID. circle-info You can download the Sample integration from [GitHubarrow-up-right](https://github.com/GreedyGame/demo-offerwall-web) ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2FwtFu5cQcg9ZXDSngP2aN%2Fblobs%2FLswXTxEAv7IAMykYqwhk%2FWow_flow%2520%281%29.png&width=768&dpr=3&quality=100&sign=16bc2268&sv=2)![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2FwtFu5cQcg9ZXDSngP2aN%2Fblobs%2FpZAkfHGAYoKlDM5kK29m%2Fwow_flow_dark.png&width=768&dpr=3&quality=100&sign=5b3f2fe3&sv=2) To integrate the PubScale Offerwall, you need to provide a set of mandatory parameters for proper configuration. **Parameters** Parameters Description **app\_id** (Required) This is the unique identifier for your app, required for integration. **user\_id** (Required) A unique identifier for each user, required to track their activity on the offerwall. We recommend using a UUID as the user\_id. **idfa** (Optional) For iOS integrations Include the **idfa** as a parameter when launching the Web Offerwall. This helps enhance tracking accuracy and plays a key role in fraud prevention. **ga\_id** (Optional) For Android integrations Include the **ga\_id** as a parameter when launching the Web Offerwall. This helps enhance tracking accuracy and plays a key role in fraud prevention. To integrate the PubScale Web Offerwall into your website, you have the following options: ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/web#id-1.1.-using-an-iframe) **1.1. Using an iframe**: Place the following iframe in your HTML: ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/web#id-1.2.-using-a-direct-link) **1.2. Using a Direct Link**: Create a direct link to the PubScale Offerwall using an anchor tag. It is recommended to use an image or button for better user experience: ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/web#id-1.3.-using-javascript) **1.3. Using JavaScript:** Open the offerwall link programmatically using `window.open`. This provides flexibility for custom implementations. [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/web#id-3.-test-the-offerwall) 2\. Setup Server-to-Server(S2S) callbacks --------------------------------------------------------------------------------------------------------------------------------------------------------- Set up the Server-to-Server (S2S) callbacks to receive instant updates whenever a user completes an offer and earns a reward. When an offer is completed, our server will send a notification to the configured callback URL. This callback provides the necessary information to process and verify the reward for the user in your application. [Learn more.](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/server-to-server-s2s-callback-configuration) [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/web#id-3.-test-the-offerwall-1) 3\. Test the OfferWall ---------------------------------------------------------------------------------------------------------------------------------------- circle-info Please use the sandbox environment for testing purposes to get instant callbacks and rewards. To learn how to enable the Sandbox environment, [click here](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/sandbox-environment/sandbox-environment) . To ensure your OfferWall integration is working perfectly, follow these steps during the testing phase. * Open the web offerwall and verify that all offers are displayed correctly. * Complete an offer and confirm that a callback is received from PubScale server to your server. For the sandbox environment, ensure the callback URL is configured properly to receive sandbox callbacks. * Ensure the hashing technique used matches the one specified in the documentation. * Verify that the reward value received matches the value displayed for the offer. * Confirm that the callback is received only from PubScale's [whitelisted server IPs](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/s2s-callback-configuration/ip-whitelist) . circle-exclamation While you can use the Web Offerwall in an Android app through a WebView or Custom Chrome Tabs, we have observed better performance and fewer chargebacks when using PubScale's dedicated SDKs. PubScale provides dedicated SDKs for [Android](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/android-integration) , [React Native](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/react-native) , and [Unity](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/unity) , which offer more secure and efficient integration methods. Please consider using these SDKs for better integration. [PreviousUnitychevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/unity) [NextiOSchevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/ios) Last updated 9 months ago * [1\. Integration](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/web#id-1.-integration) * [1.1. Using an iframe:](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/web#id-1.1.-using-an-iframe) * [1.2. Using a Direct Link:](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/web#id-1.2.-using-a-direct-link) * [1.3. Using JavaScript:](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/web#id-1.3.-using-javascript) * [2\. Setup Server-to-Server(S2S) callbacks](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/web#id-3.-test-the-offerwall) * [3\. Test the OfferWall](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/web#id-3.-test-the-offerwall-1) sun-brightdesktopmoon Copy Copy PubScale Offerwall Copy const appId = "your_app_id"; // Replace with your app ID const userId = "your_user_id"; // Replace with your unique user ID const sandbox = true; // A flag to toggle sandbox mode const offerwallUrl = `https://wow.pubscale.com?app_id=${appId}&user_id=${userId}&sandbox=${sandbox}`; window.open(offerwallUrl, '_blank'); sun-brightdesktopmoon --- # Unity | 1.0.10 | Offerwall SDK circle-exclamation **Before you start** To set up the PubScale Offerwall, you’ll need to add your app to our platform. Follow this guide for instructions on [how to set up your app](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/setting-up-your-app) . Once completed, you will receive a unique 8-digit app ID. [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/unity#preintegration-checks) [✅ arrow-up-right](https://www.alt-codes.net/check-mark-symbols.php) Preintegration checks --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- * Make sure you are using Unity version 2019.4.0f1 or above * Ensure your application builds without any errors before adding the plugin. * Android platform is selected for your Unity project. * The Editor must support Android Gradle version 4.0.1 or above. [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/unity#id-1.-add-the-offerwall-unity-plugin-to-your-unity-project) **1\. Add the OfferWall Unity plugin to your Unity project** ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [Downloadarrow-up-right](https://github.com/GreedyGame/unity-offer_wall_plugin/releases/latest) and import the latest version of OfferWall Unity Plugin from GitHub. [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/unity#id-2.-configuring-publishing-settings) **2\. Configuring Publishing Settings** ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- * Set the minimum API level to 24 or above and the target API level to 33 or above under Edit/ProjectSettings/Player/Other Settings * Make sure you check the below-mentioned checkboxes under Edit/ProjectSettings/Player/Publishing Settings. * **Custom Main Manifest** * **Custom Main Gradle Template** * **Custom Gradle Settings Template** ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2FwtFu5cQcg9ZXDSngP2aN%2Fblobs%2Fs8TJG5WoN6GOK95xrVXr%2FScreenshot%25202024-05-09%2520at%25201.06.50%25E2%2580%25AFPM.png&width=768&dpr=3&quality=100&sign=c877c055&sv=2) Player > Publishing settings [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/unity#id-3.-configuring-dependencies) **3\. Configuring dependencies** -------------------------------------------------------------------------------------------------------------------------------------------------------- Adding `mavenCentral()` as a repository in `settingsTemplate.gradle` Add the below line inside the dependencies block in your mainTemplate.gradle file [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/unity#id-4.-force-resolve-dependencies) **4\. Force resolve dependencies** ------------------------------------------------------------------------------------------------------------------------------------------------------------ **Force resolve** forces the Package Manager to resolve the project’s packages, reinstalling any altered or missing package and removing extraneous packages. To Force resolve the dependencies, Goto Assets > External Dependency Manager > Android Resolver > Force Resolve (if the resolver did not open automatically) ![](https://pubscale.gitbook.io/~gitbook/image?url=https%3A%2F%2F3371507213-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FaUVG0uxfukyc5xCdlEhZ%252Fuploads%252FUzYUObvgE35BpwNoljLm%252Fimage.png%3Falt%3Dmedia%26token%3Dbd15261f-4718-4073-ae62-8839fe558896&width=768&dpr=4&quality=100&sign=c95a673969eca060eea708c9fdc31002608f810ed2f72bebef304fa7c837926b) Assets > External Dependency Manager > Android Resolver > Force Resolve circle-info OfferWall does not work in the Editor. Please use a real device to test the integration. [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/unity#id-1.-configuring-prefabs) 5\. Configuring Prefabs ------------------------------------------------------------------------------------------------------------------------------------------ #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/unity#drag-and-drop-pubscaleofferwallobject-prefab) **Drag and Drop** PubScaleOfferwallObject **prefab** Drag and drop the **PubScaleOfferwallObject prefab** from Assets/OfferWall/Prefab/PubScaleOfferwallObject.prefab in the scene. [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/unity#id-2.-configuring-app-key) 6\. Configuring App Key ------------------------------------------------------------------------------------------------------------------------------------------ Enter your PubScale app ID inside the "Pubscale App ID" field located on the PubScaleOfferwallObject. ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2FwtFu5cQcg9ZXDSngP2aN%2Fblobs%2FRAkMAKtY5aAt8EF1wiit%2FScreenshot%25202024-05-09%2520at%25202.05.03%25E2%2580%25AFPM.png&width=768&dpr=3&quality=100&sign=8ef4f07f&sv=2) Offerwall Prefab circle-info The PubScale App ID is an 8-digit identifier generated during the app creation process within the dashboard. If you need help creating an account/app with us, [click here](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/setting-up-your-app) . [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/unity#id-2.-configuring-app-key-1) 7\. Initialize the SDK ------------------------------------------------------------------------------------------------------------------------------------------- To launch the OfferWall, call the PubScaleOfferwallClient.Initialize(string userId) function using the instance from PubScaleOfferwallObject prefab. circle-info Expected params: 1. userID: A string value that is used to identify the user uniquely in your application. If this value is null, the SDK would internally create a userId for the device. [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/unity#id-2.-configuring-app-key-2) 8\. Custom loader background image and foreground image ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2FwtFu5cQcg9ZXDSngP2aN%2Fblobs%2F9ONxn8c6Iiwt5azuVfKt%2FGroup%252078600.png&width=768&dpr=3&quality=100&sign=62d5dc44&sv=2) #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/unity#step-1-custom-loader-background-and-loader-foreground) **Step 1: Custom loader background and loader foreground** To use custom background and foreground images for the loading screen replace the **demo\_background\_img and demo\_foreground\_img** file located under Assets/OfferWall/Resources with the image you need. #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/unity#step-2-enable-read-and-write-under-advance-image-settings) **Step 2: Enable Read and Write under Advance Image settings** Press the preset button on your imported image and then select the OfferWallTextureImporter preset from the menu and click apply. circle-info If the fields are left empty, the default values will be used: * Background: Black image * Foreground: App icon [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/unity#id-2.-configuring-app-key-3) 9\. Set Offerwall Orientation -------------------------------------------------------------------------------------------------------------------------------------------------- By default, the Offerwall opens in Portrait orientation. If you want to change this behaviour, do the following changes. Add the below line inside the tag in your AndroidManifest.xml file. [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/unity#id-2.-configuring-app-key-4) 10\. Handling the SDK callbacks (optional) --------------------------------------------------------------------------------------------------------------------------------------------------------------- To handle the SDK callbacks, subscribe to the events that are made available by the SimpleIntegration script. [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/unity#id-2.-configuring-app-key-5) 11\. Launch the OfferWall ---------------------------------------------------------------------------------------------------------------------------------------------- To launch the OfferWall, call the AdvancedIntegration.ShowOfferWall() function using the PubScaleOfferwallAdvanced prefab. Can also be used in onClick of a button: ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2FwtFu5cQcg9ZXDSngP2aN%2Fblobs%2FXq8IMGKWfqHj5qJvEYcc%2FScreenshot%25202024-05-09%2520at%25202.09.42%25E2%2580%25AFPM.png&width=768&dpr=3&quality=100&sign=c2040ff7&sv=2) Example usage: Launching Offerwall on click of a button [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/unity#id-3.-test-the-offerwall) 11\. Setup S2S callbacks ------------------------------------------------------------------------------------------------------------------------------------------ Setup the S2S callbacks to get instant updates whenever the user gets the reward. You can use this callback to reward the user in your application. [Learn more.](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/s2s-callback-configuration/ip-whitelist) [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/unity#id-3.-test-the-offerwall-1) 12\. Test the OfferWall ------------------------------------------------------------------------------------------------------------------------------------------- circle-info Please use the sandbox environment for testing purposes to get instant callbacks and rewards. To learn how to enable the Sandbox environment, [click here](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/sandbox-environment/sandbox-environment) . Finally, To test the offerwall, build the application to an actual device. Check if you can launch the Offerwall and get the appropriate callbacks. [PreviousReact Nativechevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/react-native) [NextWebchevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/web) Last updated 11 months ago * [✅ Preintegration checks](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/unity#preintegration-checks) * [1\. Add the OfferWall Unity plugin to your Unity project](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/unity#id-1.-add-the-offerwall-unity-plugin-to-your-unity-project) * [2\. Configuring Publishing Settings](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/unity#id-2.-configuring-publishing-settings) * [3\. Configuring dependencies](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/unity#id-3.-configuring-dependencies) * [4\. Force resolve dependencies](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/unity#id-4.-force-resolve-dependencies) * [5\. Configuring Prefabs](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/unity#id-1.-configuring-prefabs) * [6\. Configuring App Key](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/unity#id-2.-configuring-app-key) * [7\. Initialize the SDK](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/unity#id-2.-configuring-app-key-1) * [8\. Custom loader background image and foreground image](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/unity#id-2.-configuring-app-key-2) * [9\. Set Offerwall Orientation](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/unity#id-2.-configuring-app-key-3) * [10\. Handling the SDK callbacks (optional)](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/unity#id-2.-configuring-app-key-4) * [11\. Launch the OfferWall](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/unity#id-2.-configuring-app-key-5) * [11\. Setup S2S callbacks](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/unity#id-3.-test-the-offerwall) * [12\. Test the OfferWall](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/unity#id-3.-test-the-offerwall-1) sun-brightdesktopmoon Copy pluginManagement { repositories { **ARTIFACTORYREPOSITORY** gradlePluginPortal() google() } } include ':launcher', ':unityLibrary' **INCLUDES** dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS) repositories { **ARTIFACTORYREPOSITORY** google() mavenCentral() //<----------------Add this line flatDir { dirs "${project(':unityLibrary').projectDir}/libs" } } } Copy implementation 'com.pubscale.sdkone:offerwall:1.0.10' Copy PubScaleOfferwallClient myScriptInstance = GetComponent(); // Check if the script instance is not null if (myScriptInstance != null) { myScriptInstance.InitOfferWall(userId); } Copy Copy //Define functions that would be called when the callbacks are given void OnSDKInitSuccess() { } void OnSDKInitFailed(string message) { } void OnOfferwallShowed() { } void OnOfferwallClosed() { } void OnRewardClaimed(Reward reward) { } void OnOfferwallFailed(string message) { } //Subscribe to the events PubScaleOfferwallClient.OnSDKInitSuccess += OnSDKInitSuccess; PubScaleOfferwallClient.OnSDKInitFailed += OnSDKInitFailed; PubScaleOfferwallClient.OnOfferwallShowed += OnOfferwallShowed; PubScaleOfferwallClient.OnOfferwallClosed += OnOfferwallClosed; PubScaleOfferwallClient.OnRewardClaimed += OnRewardClaimed; PubScaleOfferwallClient.OnOfferwallFailed += OnOfferwallFailed; Copy PubScaleOfferwallClient myScriptInstance = GetComponent(); // Check if the script instance is not null if (myScriptInstance != null) { myScriptInstance.ShowOfferWall(); } sun-brightdesktopmoon --- # Android Integration | 1.0.10 | Offerwall SDK circle-exclamation **Before you start** To set up the PubScale Offerwall, you’ll need to add your app to our platform. Follow this guide for instructions on [how to set up your app](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/setting-up-your-app) . Once completed, you will receive a unique 8-digit app ID. circle-info You can download the Sample integration from [GitHubarrow-up-right](https://github.com/greedygame/demo-offerwall-android) [https://www.youtube.com/watch?v=Qngthh24lsEwww.youtube.comchevron-right](https://www.youtube.com/watch?v=Qngthh24lsE) Offerwall Android SDK integration video tutorial [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/android-integration#id-1.-add-this-to-your-build.gradle-file) 1\. Add this to your build.gradle file -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Add the below line inside the **dependencies** block in your build.gradle file. Once added, clean build and rebuild the project. Kotlin Script Groovy [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/android-integration#id-2.-configure-proguard-rules) 2\. Configure proguard rules ------------------------------------------------------------------------------------------------------------------------------------------------------------------ For the SDK to work properly in release(obfuscated/minified) builds, add the following rules in your proguard-rules.pro file. [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/android-integration#id-3.-initializing-the-offerwall) 3\. Initializing the OfferWall ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- You must initialize the SDK before using the SDK. To do this, call `Offerwall.init(OfferWallConfig, OfferWallInitListener)` . ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/android-integration#id-3.1.-parameters-for-init-call) **3.1. Parameters for init call:** * **OfferWallConfig offerWallConfig:** An object to pass configuration-related info to the SDK while initializing. Refer below for how to create an object of OfferWallConfig. * **OfferWallInitListener offerWallInitListener:** A listener that informs you if the SDK initialization was successful or not. In case of failure, it will also give you a string stating the cause of the failure. This parameter is optional. ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/android-integration#id-3.2.-creating-offerwallconfig-object) **3.2. Creating OfferWallConfig object:** Create an instance of OfferWallConfig using the builder class OfferWallConfig.Builder by passing the context and your PubScale app ID. circle-info Obtain your **PubScale app ID** from the [PubScale Dashboardarrow-up-right](https://dashboard.pubscale.com/) by [adding your app and configuring the offerwall.](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/setting-up-your-app) Once completed, you will receive a unique 8-digit app ID. circle-info Use sandbox environment app ID for testing purposes. [Sandbox Environment](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/sandbox-environment/sandbox-environment) - Learn how to setup Sandbox environment Kotlin Java These are the public methods available for OfferWallConfig.Builder class: Public Methods Description setUniqueId(String uniqueId) Sets a unique id that will be used to identify the user uniquely. This will be sent back in the postback. setLoaderBackgroundBitmap(Bitmap bitmap) Accepts a bitmap and uses it as the background image for the loader and offerwall top banner. Default: Black color image setLoaderForegroundBitmap(Bitmap bitmap) Accepts a bitmap and uses it as the foreground image for the loader and offerwall top banner. Default: App icon setFullscreenEnabled(Boolean isEnabled) Sets if the offerwall should open in fullscreen mode or not. This can be used in apps or games where an immersive experience is needed. Default: false build() Builds the config and returns OfferWallConfig instance triangle-exclamation If a unique ID is not set, rewarding the user is not guaranteed. ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/android-integration#id-3.3.-making-the-init-call) **3.3. Making the init call:** Initialize the OfferWall SDK by calling the init function by passing the offer wall config. Kotlin Java circle-exclamation Make sure to handle Offerwall init failures properly as the init might fail in scenarios where the PubScale system detects a fraudulent environment. circle-info If you need to change any config after initializing the SDK, you should destroy and re-init the SDK. To destroy, call `OfferWall.destroy()` [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/android-integration#id-4.-start-the-offerwall) 4\. Start the OfferWall -------------------------------------------------------------------------------------------------------------------------------------------------------- To start the offerwall, just call, `OfferWall.launch(Context, OfferWallListener);` A listener can be set to listen for events fired by the Offer Wall. Kotlin Java circle-info onRewardClaimed callback gives you the reward amount and currency details. To start the OfferWall, call the launch method of the OfferWall class. Kotlin Java [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/android-integration#id-3.-test-the-offerwall) 5\. Setup S2S callbacks ------------------------------------------------------------------------------------------------------------------------------------------------------- Setup the S2S callbacks to get instant updates whenever the user gets the reward. You can use this callback to reward the user in your application. [Learn more.](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/s2s-callback-configuration/ip-whitelist) [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/android-integration#id-3.-test-the-offerwall-1) 6\. Test the OfferWall -------------------------------------------------------------------------------------------------------------------------------------------------------- circle-info Please use the sandbox environment for testing purposes to get instant callbacks and rewards. To learn how to enable the Sandbox environment, [click here](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/sandbox-environment/sandbox-environment) . Finally, To test the offerwall, build the application to an actual device. Check if you can launch the Offerwall and get the appropriate callbacks. [PreviousSetting up your appchevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/setting-up-your-app) [NextReact Nativechevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/react-native) Last updated 10 months ago * [1\. Add this to your build.gradle file](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/android-integration#id-1.-add-this-to-your-build.gradle-file) * [2\. Configure proguard rules](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/android-integration#id-2.-configure-proguard-rules) * [3\. Initializing the OfferWall](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/android-integration#id-3.-initializing-the-offerwall) * [3.1. Parameters for init call:](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/android-integration#id-3.1.-parameters-for-init-call) * [3.2. Creating OfferWallConfig object:](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/android-integration#id-3.2.-creating-offerwallconfig-object) * [3.3. Making the init call:](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/android-integration#id-3.3.-making-the-init-call) * [4\. Start the OfferWall](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/android-integration#id-4.-start-the-offerwall) * [5\. Setup S2S callbacks](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/android-integration#id-3.-test-the-offerwall) * [6\. Test the OfferWall](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/android-integration#id-3.-test-the-offerwall-1) sun-brightdesktopmoon Copy implementation("com.pubscale.sdkone:offerwall:1.0.10") Copy implementation 'com.pubscale.sdkone:offerwall:1.0.10' proguard-rules.pro Copy -keep class com.pubscale.sdkone.offerwall.** {*;} -keep class com.pubscale.caterpillar.analytics.** {*;} #Supporting R8 full mode -keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation -keep,allowobfuscation,allowshrinking interface retrofit2.Call -keep,allowobfuscation,allowshrinking class retrofit2.Response Copy import com.pubscale.sdkone.offerwall.OfferWallConfig .. .. val offerWallConfig = OfferWallConfig.Builder(context, "YOUR_PUBSCALE_APP_ID") .setUniqueId("unique_id") .build() Copy import com.pubscale.sdkone.offerwall.OfferWallConfig .. .. OfferWallConfig offerWallConfig = new OfferWallConfig.Builder(context, "YOUR_PUBSCALE_APP_ID") .setUniqueId("unique_id") .build(); Copy OfferWall.init(offerWallConfig, object : OfferWallInitListener { override fun onInitSuccess() { } override fun onInitFailed(error: InitError) { } }) Copy OfferWall.init(offerWallConfig, new OfferWallInitListener() { @Override public void onInitSuccess() { } @Override public void onInitFailed(@NonNull InitError error) { } }); Copy import com.pubscale.sdkone.offerwall.OfferWall import com.pubscale.sdkone.offerwall.models.OfferWallListener import com.pubscale.sdkone.offerwall.models.Reward .. .. .. val offerWallListener = object : OfferWallListener{ override fun onOfferWallShowed() { Log.d("PSOfferwall", "Offer wall showed.") } override fun onOfferWallClosed() { Log.d("PSOfferwall", "Offer wall closed.") } override fun onRewardClaimed(reward: Reward) { Log.d("PSOfferwall", "Offer wall reward claimed.") } override fun onFailed(message: String) { Log.d("PSOfferwall", "onFailed: $message") } } Copy import com.pubscale.sdkone.offerwall.OfferWall import com.pubscale.sdkone.offerwall.models.OfferWallListener import com.pubscale.sdkone.offerwall.models.Reward .. .. OfferWallListener offerWallListener = new OfferWallListener() { @Override public void onOfferWallShowed() { Log.d("PSOfferwall", "Offer wall showed."); } @Override public void onOfferWallClosed() { Log.d("PSOfferwall", "Offer wall closed."); } @Override public void onRewardClaimed(@NonNull Reward reward) { Log.d("PSOfferwall", "Offer wall reward claimed."); } @Override public void onFailed(@NonNull String message) { Log.d("PSOfferwall", "onFailed: " + message); } }; Copy import com.pubscale.sdkone.offerwall.OfferWall import com.pubscale.sdkone.offerwall.models.OfferWallListener .. .. OfferWall.launch(context, offerWallListener) Copy import com.pubscale.sdkone.offerwall.OfferWall import com.pubscale.sdkone.offerwall.models.OfferWallListener .. .. OfferWall.launch(context, offerWallListener); sun-brightdesktopmoon --- # API | 1.0.10 | Offerwall SDK By integrating this API, publishers can seamlessly fetch and display these offers within their own user interface. This allows for the creation of fully native and personalised in-app experiences that align with the app’s design and user flow, enhancing user engagement and improving conversion rates. triangle-exclamation Pre-approval from PubScale team is required for the offerwall integration. Please contact your account manager or reach out to support before starting this integration. [Learn More](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/faqs#how-to-approval-for-web-integration) [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/api#id-1.-authentication) 1\. Authentication ------------------------------------------------------------------------------------------------------------------------------ In order to access offers API. Following Keys need to be generated. 1. Pub Key (Generated once per publisher) 2. App ID #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/api#app-id) App-ID In order to generate an App ID follow this guide for instructions on [how to set up your app](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/setting-up-your-app) . Once completed, you will receive a unique 8-digit App ID. This will be used as App ID to access the API. #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/api#pub-key) Pub-Key In order the generate a Publisher Key a pre-approval is required. This is a one time approval for a publisher. Please contact account manager for the same. After your account is approved, you can proceed with the following steps to generate your Publisher API Key. triangle-exclamation **When you regenerate the Offerwall API Key, the new key will apply to all apps linked to your account.** #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/api#steps) Steps: 1. Once logged in, you’ll find Settings in the side navigation panel. ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2F4253310960-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FwtFu5cQcg9ZXDSngP2aN%252Fuploads%252FLzR9y0rl7Ktqmh2mp8M9%252F1.png%3Falt%3Dmedia%26token%3D5672c74a-5251-410b-b997-63b0923f68b2&width=768&dpr=3&quality=100&sign=364ee0ea&sv=2) 1. Go to the API Key section to generate your Offerwall API key. If you don't see this section, please contact your account manager for enabling access. ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2F4253310960-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FwtFu5cQcg9ZXDSngP2aN%252Fuploads%252Fvvxyxxm8IhUk6EukFbVo%252F2.png%3Falt%3Dmedia%26token%3D734fde72-9169-4094-8dba-2ee7d627240c&width=768&dpr=3&quality=100&sign=a21ec49e&sv=2) 1. Navigate to the Offerwall API section to access and create your Offerwall API key. ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2F4253310960-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FwtFu5cQcg9ZXDSngP2aN%252Fuploads%252F9LbRADkCv47wyFGAK56w%252F3.png%3Falt%3Dmedia%26token%3Dc5c01bb9-6363-4e37-bbb2-38469aa8a75f&width=768&dpr=3&quality=100&sign=2d6ad453&sv=2) 1. Please copy the key from the image and paste it into your Offerwall API setup. ![](https://pubscale.gitbook.io/offerwall-sdk/~gitbook/image?url=https%3A%2F%2F4253310960-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FwtFu5cQcg9ZXDSngP2aN%252Fuploads%252FkLx6pyQz5jerPC0XG5O4%252F4.png%3Falt%3Dmedia%26token%3D2e6db12f-36ad-4005-9fed-d6e897764e38&width=768&dpr=3&quality=100&sign=8cad21e3&sv=2) * * * [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/api#id-2.-offers-api) 2\. Offers API: ----------------------------------------------------------------------------------------------------------------------- ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/api#description) Description: The API provides a list of offers available for your app, which can be used to display and run offers on your platform. circle-exclamation Offers are cached on our server and refreshed every 5 minutes. We recommend updating your inventory accordingly. ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/api#endpoint) Endpoint: #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/api#auth) Auth: The keys generated in the previous steps must be included in the following headers when making API requests. These are **Mandatory** for accessing the API. * **App-Id** – The unique App ID generated for your app during the setup process. * **Pub-Key** – The unique key generated for your publisher account during setup. This key is shared across all apps within the same account. ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/api#example) Example: ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/api#payload) Payload: Body Required Type Description page Required Integer The `page` field in the Offers API response indicates the current page number and should always be a positive integer. size Required Integer The `size` field in the Offers API response represents the number of offers returned in that response and should always be a positive integer. filt Optional Array Contains an array of filters to be applied to the Offers API request to refine the results based on specified criteria. dim Optional String Specifies the dimension on which the filter is applied. Supported values are `offer_type`, `platform`, and `country`. match Optional Model Contains details about the filter to be applied, including the values to filter by and the match type used for filtering. type Optional String Specifies the match type to be used for the filter. Supported values are `any` (matches any of the provided values) and `exact` (requires a single, exact value match). values Optional Array Contains the values to apply the filter on. Allowed values depend on the specified filter dimension. chevron-rightFilter Values[hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/api#filter-values) **Offer Type**: * `CPR` – Cost Per Registration * `CPI` - Cost Per Install * `CPL` – Cost Per Lead * `CPC` – Cost Per Click * `CPE` – Cost Per Engagement * `CPA` – Cost Per Action * `APK_INSTALL` – APK-based Install * `APK_REGISTER` – APK-based Registration **Example Curl:** **Platforms** * `ios` – Apple iOS platform * `android` – Android platform * `web` – Web-based platform **Example Curl:** **Country** * Countries must be specified using the **standard ISO Alpha-2 country codes** (e.g., `US` for United States, `IN` for India, `FR` for France). **Example Curl:** * * * ### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/api#example-response) Example Response: chevron-rightResponse Details[hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/api#response-details) Field Description `offers` An array containing the offer details. Each element represents an individual offer. `id` A unique identifier for the offer. `upd_ts` The timestamp when the offer was last updated (in UNIX timestamp format). `off_type` The type of offer (e.g., `CPI` for Cost Per Install, `CPC` for Cost Per Click, etc.). `s_id` The unique identifier for the app associated with the offer. `name` The name of the app or offer. `lp_url` The link to the landing page for the app (usually a store link). `pyt` Payment details for the offer. Contains `cur` (currency) and `amt` (amount). `inapp_pyt` Displays payout details in the application's currency, with `cur` representing the currency name and `amt` the amount, based on app settings. `crtvs` Creatives related to the offer. Contains `ic_url` (URL to the icon image). `desc` Description of the offer. Contains `raw` (raw description text). `ctg` Categories associated with the offer (e.g., `SINGLE_STEP`). **Possible values**: `SINGLE_STEP`, `MULTI_REWARD`, `DEPOSIT`, `GAMING`, `FINANCE`, `SURVEY`, `NEW` `gls` A list of goals for the offer. Each goal has `id`, `gl_val` (value), `ttl` (title), `instr` (instructions), and `pyt` (payment details) and `inapp_yt`(payment in apps currency). `trk_url` Tracking URL for tracking user actions like clicks or installs, with placeholders for dynamic user data. `geo_tgt` Geographical targeting information. Contains `include` (countries to include) and `exclude` (countries to exclude). `os` The operating system platform for the app (e.g., `android`, `ios`). `total` The total number of offers available (in this case, `1931` offers). `metrics` Contains performance metrics related to the offer, including CR (Conversion Rate) and EPC (Earnings Per Click). Currently, only global values are supported. * * * [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/api#id-3.-click-parameters) 3\. Click Parameters: ----------------------------------------------------------------------------------------------------------------------------------- You can use the tracking link provided in the `trk_url` field of each offer in the API response to start sending click events to Pubscale. This tracking link is essential for monitoring user interactions and attributing tasks correctly. Purpose The `trk_url` is used to track clicks from users on a particular offer. When a user interacts with an offer, your app or system should trigger this URL with the appropriate parameters. * * * #### [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/api#supported-click-parameters) Supported Click Parameters The following query parameters are supported for integration with the tracking URL: Parameter Required Description `user_id` Manadatory The unique identifier of the user who clicks on the offer. This will be included in the callback. Special characters aren't allowed except "\_","@","-" and ".". `gaid` Recomended Google Advertising ID (required for Android users). `idfa` Recomended Identifier for Advertisers (required for iOS users). `c1-c5` Optional Custom parameters can be appended to the tracking URL by the publisher and will be included in the callback for reference. Special characters aren't allowed except "\_","@","-" and "." [hashtag](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/api#id-3.-test-the-offerwall) 4\. Setup Server-to-Server(S2S) callbacks --------------------------------------------------------------------------------------------------------------------------------------------------------- circle-check This step is manadatory for rewarding users. Set up the Server-to-Server (S2S) callbacks to receive instant updates whenever a user completes an offer and earns a reward. When an offer is completed, our server will send a notification to the configured callback URL. This callback provides the necessary information to process and verify the reward for the user in your application. [Learn more.](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/server-to-server-s2s-callback-configuration) [PreviousiOSchevron-left](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/ios) [NextServer-to-Server (S2S) Callback Configurationchevron-right](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/server-to-server-s2s-callback-configuration) Last updated 9 months ago * [1\. Authentication](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/api#id-1.-authentication) * [2\. Offers API:](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/api#id-2.-offers-api) * [Description:](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/api#description) * [Endpoint:](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/api#endpoint) * [Example:](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/api#example) * [Payload:](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/api#payload) * [Example Response:](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/api#example-response) * [3\. Click Parameters:](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/api#id-3.-click-parameters) * [4\. Setup Server-to-Server(S2S) callbacks](https://pubscale.gitbook.io/offerwall-sdk/1.0.10/basic-integration/api#id-3.-test-the-offerwall) sun-brightdesktopmoon Copy POST https://api-ow.pubscale.com/v1/offer/api Copy curl 'https://api-ow.pubscale.com/v1/offer/api' \ --header 'App-Id: ' \ --header 'Pub-Key: ' \ --header 'Content-Type: application/json' \ --data '{ "page": 1, "size": 1000, "filt": [\ {\ "dim": "offer_type",\ "match": {\ "type": "any",\ "value": [\ "CPI"\ ]\ }\ }\ ] }' Copy curl --location 'https://api-dev.sikkaapp.in/v1/offer/api' \ --header 'App-Id: 77754913' \ --header 'Pub-Key: 09DAE7FB5D9AA83582DE7703348D8087' \ --header 'Content-Type: application/json' \ --data '{ "page": 1, "size": 1000, "filt": [\ {\ "dim": "offer_type",\ "match": {\ "type": "any",\ "value": [\ "CPI","CPA"\ ]\ }\ }\ ] }' -v Copy curl --location 'https://api-dev.sikkaapp.in/v1/offer/api' \ --header 'App-Id: 77754913' \ --header 'Pub-Key: 09DAE7FB5D9AA83582DE7703348D8087' \ --header 'Content-Type: application/json' \ --data '{ "page": 1, "size": 1000, "filt": [\ {\ "dim": "platform",\ "match": {\ "type": "any",\ "value": [\ "web","ios","android"\ ]\ }\ }\ ] }' -v Copy curl --location 'https://api-dev.sikkaapp.in/v1/offer/api' \ --header 'App-Id: 77754913' \ --header 'Pub-Key: 09DAE7FB5D9AA83582DE7703348D8087' \ --header 'Content-Type: application/json' \ --data '{ "page": 1, "size": 1000, "filt": [\ {\ "dim": "country",\ "match": {\ "type": "any",\ "value": [\ "IN","US"\ ]\ }\ }\ ] }' -v Copy { "offers": [\ {\ "id": "973839",\ "upd_ts": 1745834294,\ "off_type": "CPI",\ "s_id": "nova.solitaire.patience.card.games.klondike.free",\ "name": "Classic Solitaire : Card Game",\ "lp_url": "https://play.google.com/store/apps/details?id=nova.solitaire.patience.card.games.klondike.free",\ "pyt": {\ "cur": "USD",\ "amt": 0.0325\ },\ "inapp_pyt": {\ "cur": "Bullets",\ "amt": 4.875\ }\ "crtvs": {\ "ic_url": "https://play-lh.googleusercontent.com/TIogtAtBq22AAHUK8q0nkXVi3KPPssCqIjp2J5JmLLuw8sdStdpeiRsPg1STEIo2ng"\ },\ "desc": {\ "raw": "Classic Solitaire : Card Game"\ },\ "ctg": [\ "SINGLE_STEP"\ ],\ "gls": [\ {\ "id": "2710875",\ "gl_val": null,\ "ttl": "Complete Install and Use The App",\ "instr": "1.Click on redeem now.\n2.Install the app.\n3.Use the app.\n4.Explore the app and enjoy.",\ "pyt": {\ "cur": "USD",\ "amt": 0.0325\ },\ "inapp_pyt": {\ "cur": "Bullets",\ "amt": 4.875\ },\ "ord": 1\ }\ ],\ "trk_url": "https://api-ow.pubscale.com/v2/tracking/click?rid=2710875&app=77754913&user_id={your_user_id}&gaid={gaid_for_android}&idfa={idfa_for_ios}",\ "geo_tgt": {\ "include": [\ "AT"\ ],\ "exclude": []\ },\ "os": "android",\ "metrics": [\ {\ "m_type": "GLOBAL",\ "cr": 80,\ "epc": 23.87\ }\ ]\ }\ ], "total": 1931 } sun-brightdesktopmoon --- # Welcome to Immersive Ads 2 | Immersive Ads SDK ![Page cover](https://pubscale.gitbook.io/immersive-ads-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fyi7AJIrqv3A12rV6WjHM%2Fblobs%2FVmnIa0j6JrCbyVHQR8lO%2Fbanner%25201.jpg&width=1248&dpr=3&quality=100&sign=e5b12c06&sv=2) [hashtag](https://pubscale.gitbook.io/immersive-ads-sdk#overview) Overview ------------------------------------------------------------------------------- The Immersive Ads SDK is a powerful tool that enables developers to seamlessly integrate native ads into their Unity mobile games. With this SDK, developers can monetize their games by displaying non-intrusive native ads in the game scenes, providing players with an engaging advertising experience. [hashtag](https://pubscale.gitbook.io/immersive-ads-sdk#features) Features ------------------------------------------------------------------------------- 1. **Easy Drag & Drop integration:** The SDK provides a straightforward integration process, and can be done entirely without touching code. 2. **Native Ad Display Prefabs:** Ready-to-use ad prefabs that dynamically adjust themselves based on different dimensions of ad creatives received from Advertisers. 3. **Boost Revenue:** Earn recurring incremental revenue with a one-time integration process. 4. **Scripting API:** You also have the option of using the Scripting API to trigger ad events from code. 5. **Dynamic Configuration:** Change and fine-tune ad behavior on the go after publishing with our remote config features. [hashtag](https://pubscale.gitbook.io/immersive-ads-sdk#quick-links) Quick links ------------------------------------------------------------------------------------- 1. [PubScale dashboardarrow-up-right](https://dashboard.pubscale.com/) 2. [SDK Github pagearrow-up-right](https://github.com/GreedyGame/immersive-ads-unity) [hashtag](https://pubscale.gitbook.io/immersive-ads-sdk#get-started) Get Started ------------------------------------------------------------------------------------- We've put together some helpful guides to set up our SDK quickly and easily. [📪Prerequisiteschevron-right](https://pubscale.gitbook.io/immersive-ads-sdk/prerequisites/prerequisites) [Integrationchevron-right](https://pubscale.gitbook.io/immersive-ads-sdk/integration/adding-the-sdk) [🩺Testing the integrationchevron-right](https://pubscale.gitbook.io/immersive-ads-sdk/integration/testing-the-integration) [🛠️Troubleshootchevron-right](https://pubscale.gitbook.io/immersive-ads-sdk/integration/troubleshoot) [NextRelease noteschevron-right](https://pubscale.gitbook.io/immersive-ads-sdk/release-notes) Last updated 1 month ago * [Overview](https://pubscale.gitbook.io/immersive-ads-sdk#overview) * [Features](https://pubscale.gitbook.io/immersive-ads-sdk#features) * [Quick links](https://pubscale.gitbook.io/immersive-ads-sdk#quick-links) * [Get Started](https://pubscale.gitbook.io/immersive-ads-sdk#get-started) sun-brightdesktopmoon sun-brightdesktopmoon --- # IP Whitelist | Offerwall SDK You can restrict the callbacks to be accepted only from our sever IP address(es). Please whitelist the following IP(s) and regularly check back to find possible changes Copy 34.100.236.68 34.100.128.195 34.14.172.7 //Last updated at: Jan 20, 2026 Last updated 2 months ago sun-brightdesktopmoon sun-brightdesktopmoon --- # IP Whitelist | 1.0.9 | Offerwall SDK You can restrict the callbacks to be accepted only from our sever IP address(es). Please whitelist the following IP(s) and regularly check back to find possible changes Copy 34.100.236.68 //Last updated at: Jan 23, 2024 Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # IP Whitelist | 1.0.10 | Offerwall SDK You can restrict the callbacks to be accepted only from our sever IP address(es). Please whitelist the following IP(s) and regularly check back to find possible changes Copy 34.100.236.68 //Last updated at: Jan 23, 2024 sun-brightdesktopmoon sun-brightdesktopmoon --- # Demand Source setup | Immersive Ads SDK ### [hashtag](https://pubscale.gitbook.io/immersive-ads-sdk/prerequisites/demand-source-setup#create-an-account) Create an account Create an account with PubScale through the dashboard at [https://dashboard.pubscale.comarrow-up-right](https://dashboard.pubscale.com/) ### [hashtag](https://pubscale.gitbook.io/immersive-ads-sdk/prerequisites/demand-source-setup#id-1.-add-your-app) 1\. ADD YOUR APP Once the feature is enabled, you can access it from the side navigation list. Click on the **Immersive Ads** item on the navigation list ![](https://pubscale.gitbook.io/immersive-ads-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fyi7AJIrqv3A12rV6WjHM%2Fblobs%2FwjVlkka4FoHe9WcHrTgX%2FGroup%252078581.png&width=768&dpr=3&quality=100&sign=bb37649a&sv=2) Immersive Ads highlighted in the side navigation Next, click on the **Add App** button and provide the required details to create an app. ![](https://pubscale.gitbook.io/immersive-ads-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fyi7AJIrqv3A12rV6WjHM%2Fblobs%2FyPEE7Rm8IVFItq77KMfm%2FGroup%252078581%2520%281%29.png&width=768&dpr=3&quality=100&sign=37669bac&sv=2) **Add App** button highlighted ### [hashtag](https://pubscale.gitbook.io/immersive-ads-sdk/prerequisites/demand-source-setup#id-2.-enabling-demand) 2\. ENABLING DEMAND: * Connect with your Account Manager to enable demand on the App The dashboard side configuration for the SDK is complete. You can now start with the integration process. [PreviousPrerequisiteschevron-left](https://pubscale.gitbook.io/immersive-ads-sdk/prerequisites/prerequisites) [NextAdding the SDKchevron-right](https://pubscale.gitbook.io/immersive-ads-sdk/integration/adding-the-sdk) Last updated 1 month ago * [Create an account](https://pubscale.gitbook.io/immersive-ads-sdk/prerequisites/demand-source-setup#create-an-account) * [1\. ADD YOUR APP](https://pubscale.gitbook.io/immersive-ads-sdk/prerequisites/demand-source-setup#id-1.-add-your-app) * [2\. ENABLING DEMAND:](https://pubscale.gitbook.io/immersive-ads-sdk/prerequisites/demand-source-setup#id-2.-enabling-demand) sun-brightdesktopmoon sun-brightdesktopmoon --- # Adding the SDK | Immersive Ads SDK #### [hashtag](https://pubscale.gitbook.io/immersive-ads-sdk/integration/adding-the-sdk#id-1.-add-the-google-mobile-a-ds-plugin-to-your-project) 1\. Add the Google Mobile Ads plugin to your project [Downloadarrow-up-right](https://github.com/googleads/googleads-mobile-unity/releases) and import the **Google Mobile Ads** **plugin.** Note: The SDK supports AdMob version **v9.6.0 and upwards** **2\. Add the PubScale Immersive Ads 2 plugin to your project** Contact your Account Manager to obtain the SDK package. Import the package into your project. **3\. Ensuring 16KB page size compliance on Android** * If upgrading from a previous version of the SDK (2.1.0 or earlier), make sure to delete the GoogleMobileAdsNative folder and re-import from the latest SDK package. * Failing to do so will not result in errors; however, the app will fail to run on a device with a 16 KB memory page size, and the AAB file will be flagged on the Play Console for containing 16 KB incompatible libraries. **4\. Force Resolve Dependencies** Force resolve the dependencies from **Assets/External Dependency Manager/Android Resolver/Force Resolve** if the resolver did not open automatically. ![](https://pubscale.gitbook.io/immersive-ads-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fyi7AJIrqv3A12rV6WjHM%2Fblobs%2Fk2ItUpE5zm3uRntohTwf%2FforceResolve.png&width=300&dpr=3&quality=100&sign=e96157fe&sv=2) We have added the SDK to the project. Learn how to link the app in the next step. [PreviousDemand Source setupchevron-left](https://pubscale.gitbook.io/immersive-ads-sdk/prerequisites/demand-source-setup) [NextApp Linkingchevron-right](https://pubscale.gitbook.io/immersive-ads-sdk/integration/app-linking) Last updated 1 month ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Testing the integration | Immersive Ads SDK To test the integration, always check the **Use Test Mode** **field in the** PubScale Editor window. This will enable test ads and show a debug UI over the native ad for checking Ad Impressions and Clicks. ![](https://pubscale.gitbook.io/immersive-ads-sdk/~gitbook/image?url=https%3A%2F%2F2443726033-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fyi7AJIrqv3A12rV6WjHM%252Fuploads%252FYku5NgUXXt2ccizxS0PZ%252FEnable%2520Test%2520mode.png%3Falt%3Dmedia%26token%3D1d36034d-658f-443d-81bb-6c3de321fc24&width=768&dpr=3&quality=100&sign=971c7828&sv=2) [hashtag](https://pubscale.gitbook.io/immersive-ads-sdk/integration/testing-the-integration#editor-test-a-ds) **Editor Test Ads** -------------------------------------------------------------------------------------------------------------------------------------- Hit the play button in the editor and ensure editor test ads are visible and there are no errors or warnings. ### [hashtag](https://pubscale.gitbook.io/immersive-ads-sdk/integration/testing-the-integration#test-impressions-and-clicks) **Test Impressions and clicks** #### [hashtag](https://pubscale.gitbook.io/immersive-ads-sdk/integration/testing-the-integration#checking-viewability-in-editor) **Checking Viewability in Editor** You can get an estimated feedback for impression viewability in the Editor itself using the status visualizer, as shown in the video. circle-info Note: The Unity editor is not a production environment. The editor's feedback may not be 100% accurate in all cases, and a final check should be done on an actual device. This step should be used as a time-saving tool when adding ad placements to the game scenes. The final check for impressions and clickability should be done on a device, as described in the next section. #### [hashtag](https://pubscale.gitbook.io/immersive-ads-sdk/integration/testing-the-integration#testing-on-device) **Testing on Device** Finally, to test Impressions and Clicks, **build the application on an actual device****.** Check if you can see the impression indicator turning green when the ad comes inside the camera view, and the click indicator turning green when you tap on the ad. ![](https://pubscale.gitbook.io/immersive-ads-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fyi7AJIrqv3A12rV6WjHM%2Fblobs%2FZ10Uf08hiX78ox9D66E8%2FTest%2520Ad%25201.jpg&width=768&dpr=3&quality=100&sign=1734cd3c&sv=2) ![](https://pubscale.gitbook.io/immersive-ads-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fyi7AJIrqv3A12rV6WjHM%2Fblobs%2Fat84vorEuHzWCsktj8Dm%2FTest%2520Ad%25202.jpg&width=768&dpr=3&quality=100&sign=c6c841ff&sv=2) [PreviousScene setupchevron-left](https://pubscale.gitbook.io/immersive-ads-sdk/integration/scene-setup) [NextIntegration Checklistchevron-right](https://pubscale.gitbook.io/immersive-ads-sdk/integration/integration-checklist) Last updated 1 month ago * [Editor Test Ads](https://pubscale.gitbook.io/immersive-ads-sdk/integration/testing-the-integration#editor-test-a-ds) * [Test Impressions and clicks](https://pubscale.gitbook.io/immersive-ads-sdk/integration/testing-the-integration#test-impressions-and-clicks) sun-brightdesktopmoon sun-brightdesktopmoon --- # Release notes | Immersive Ads SDK #### [hashtag](https://pubscale.gitbook.io/immersive-ads-sdk/release-notes#updates) Updates * Added new Horizontal Ad 32x10 aspect ratio support * Cache level optimizations and Editor enhancements * Minor bug fixes #### [hashtag](https://pubscale.gitbook.io/immersive-ads-sdk/release-notes#built-and-tested-with) Built and tested with: * Unity 2021.3.45f2 and upwards * Supports AdMob version v9.6.0 and upwards * * * PREVIOUS RELEASES **v2.4.0** #### [hashtag](https://pubscale.gitbook.io/immersive-ads-sdk/release-notes#updates-1) Updates * Added support for [In-editor ad viewability checks](https://pubscale.gitbook.io/immersive-ads-sdk/integration/testing-the-integration) for faster workflows * Minor improvements and bug fixes #### [hashtag](https://pubscale.gitbook.io/immersive-ads-sdk/release-notes#built-and-tested-with-1) Built and tested with: * Unity 2021.3.45f1 and upwards * Supports AdMob version v9.6.0 and upwards **v2.3.0** #### [hashtag](https://pubscale.gitbook.io/immersive-ads-sdk/release-notes#updates-2) Updates * Added support for [AD badge customization](https://pubscale.gitbook.io/immersive-ads-sdk/presentation/important-changes#id-3.-adjust-a-d-badge-for-better-ad-policy-compliance) * minor improvements and bug fixes #### [hashtag](https://pubscale.gitbook.io/immersive-ads-sdk/release-notes#built-and-tested-with-2) Built and tested with: * Unity 2021.3.45f1 and upwards * Supports AdMob version v9.6.0 and upwards **v2.2.0** #### [hashtag](https://pubscale.gitbook.io/immersive-ads-sdk/release-notes#features) Features * Android 16KB page size compliant * SDKv2 now supports iOS * Minor improvements and bug fixes #### [hashtag](https://pubscale.gitbook.io/immersive-ads-sdk/release-notes#built-and-tested-with-3) Built and tested with: * Unity 2021.3.45f1 and upwards * Supports AdMob version v9.6.0 and upwards **v2.1.0** #### [hashtag](https://pubscale.gitbook.io/immersive-ads-sdk/release-notes#release-2.1.0-with-admob-10-compatibility) **Release 2.1.0 with AdMob 10+ Compatibility 🚀** This release introduces a new major version of the SDK, updating compatibility with the latest Google AdMob Unity SDK * AdMob 10+ support: The SDK is now fully compatible with AdMob Unity SDK 9.6.0 and above. * Updated APl and integrations to align with the breaking changes introduced in AdMob 10. * Addition of native video ads **Migration Notes** * If you are currently on SDK v1.x.x and using AdMob Unity SDK version < 9.6, you must upgrade your AdMob SDK to version 9.6 or above before moving to this release. **Built and tested with:** * Unity 2021 LTA and upwards * Supports AdMob version v9.6.0 and upwards * iOS support in the upcoming release [PreviousWelcome to Immersive Ads 2chevron-left](https://pubscale.gitbook.io/immersive-ads-sdk) [NextPrerequisiteschevron-right](https://pubscale.gitbook.io/immersive-ads-sdk/prerequisites/prerequisites) Last updated 1 month ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Prerequisites | Immersive Ads SDK ### [hashtag](https://pubscale.gitbook.io/immersive-ads-sdk/prerequisites/prerequisites#before-starting-the-sdk-integration-make-a-quick-check-of-the-things-listed-below) Before starting the SDK integration, make a quick check of the things listed below: 1. Make sure you are using Unity version 2021.3.45f2 and upwards 2. The platform selected for your Unity project is based on the target device 3. You have the GAM App ID or [AdMob app IDarrow-up-right](https://admob.google.com/home/) and a Google IIG (Immersive in-game) ad unit ID. Make sure the AdMob Unity SDK version is **v9.6.0 or above** 4. You have a [PubScale App ID](https://pubscale.gitbook.io/immersive-ads-sdk/prerequisites/demand-source-setup) for the platform you are targeting (Android / iOS) 5. Ensure your application builds without any errors BEFORE adding the SDK * * * **GAM DEMAND SET UP WITH PUBSCALE:** * Get in touch with your Account Manager to complete the demand setup. **IF YOU HAVE ACCESS TO GOOGLE IMMERSIVE ON ADMOB:** * Share the Admob App ID and Admob Google IIG Ad unit ID with your AM ![](https://pubscale.gitbook.io/immersive-ads-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fyi7AJIrqv3A12rV6WjHM%2Fblobs%2F68ax5FTpu8HAf8WVn9nC%2FIIG%2520Unit%2520Creation.png&width=768&dpr=3&quality=100&sign=2c456ad8&sv=2) [PreviousRelease noteschevron-left](https://pubscale.gitbook.io/immersive-ads-sdk/release-notes) [NextDemand Source setupchevron-right](https://pubscale.gitbook.io/immersive-ads-sdk/prerequisites/demand-source-setup) Last updated 1 month ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Ad Object Structure | Immersive Ads SDK ### [hashtag](https://pubscale.gitbook.io/immersive-ads-sdk/presentation/ad-object-structure#a-d-image-components-in-the-admob-native-ad-format) **AD IMAGE COMPONENTS IN THE ADMOB NATIVE AD FORMAT** ![](https://pubscale.gitbook.io/immersive-ads-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fyi7AJIrqv3A12rV6WjHM%2Fblobs%2FMDZWs4uf7sfGdXZ3pMeW%2FScreenshot_20231201_163049.jpg&width=768&dpr=3&quality=100&sign=65060052&sv=2) 1. Small icon image (e.g. advertiser logo) 2. The Big image showing the product * The Ad fill may or may not have a big product image. * If the big product image is available, it can be of landscape, square, or portrait aspect ratio. * The SDK handles all these conditions automatically and contains Display Handler Templates for the different cases. * * * #### [hashtag](https://pubscale.gitbook.io/immersive-ads-sdk/presentation/ad-object-structure#id-1.1-understanding-the-a-d-display-variants) 1.1 **UNDERSTANDING THE AD DISPLAY VARIANTS** The Display Handling Templates can be broadly classified under two categories: 1. MEDIA VIEW TYPES (Ad contains Big Image) 1. MediaLandscapeSimple 2. MediaLanscapeBlur 3. MediaPortrait 2. NON MEDIA VIEW (Ad does not contain Big Image) 1. NonMedia * * * **1.2 STRUCTURE OF THE SDK AD PREFAB** The structure of SDK's Ad object is shown below: ![](https://pubscale.gitbook.io/immersive-ads-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fyi7AJIrqv3A12rV6WjHM%2Fblobs%2FgXMYoTV5yye8Zn3gFqBe%2FStructure%2520of%2520Ad%2520object.png&width=768&dpr=3&quality=100&sign=edd708c6&sv=2) The object hierarchy is similar for both Screen Space (SS\_NativeAd) and World Space (WS\_NativeAd) with minor differences OBJECT NAME DESCRIPTION Placeholder An image to show before the Ad loads This can also be set to None or 100% transparent to show nothing before the Ad is loaded MediaViewTypes Parent for all Display Templates containing Big Image NonMediaView Parent for Display Templates without Big Image StatusVisualiser A debug tool that indicates impression and click detection status Only displayed with Test ads * * * #### [hashtag](https://pubscale.gitbook.io/immersive-ads-sdk/presentation/ad-object-structure#id-1.3-general-structure-of-display-handler-template-objects) **1.3 GENERAL STRUCTURE OF DISPLAY HANDLER TEMPLATE OBJECTS** ![](https://pubscale.gitbook.io/immersive-ads-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fyi7AJIrqv3A12rV6WjHM%2Fblobs%2Fyr92T7K0fKu4ZM5Yz77a%2FScreenshot%25202023-12-03%2520at%252011.44.54%2520PM.png&width=768&dpr=3&quality=100&sign=47885f2d&sv=2) The image above shows the object hierarchy of the MediaLandscapeSimple display template. The structure is similar to other templates as well with minor variations. GameObject NAME DESCRIPTION BigImage Has image component to display Big Product texture AdIconImageHolder Background for Ad Icon AdIconImg Has image component to display Advertiser Logo icon CtaStars Contains child display objects for CTA button and Star Rating AdChoices AdTag Google requirements for Ad Compliance [PreviousImportant Changeschevron-left](https://pubscale.gitbook.io/immersive-ads-sdk/presentation/important-changes) [NextChanging Ad Visualschevron-right](https://pubscale.gitbook.io/immersive-ads-sdk/presentation/changing-ad-visuals) Last updated 1 month ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Troubleshoot | Immersive Ads SDK ### [hashtag](https://pubscale.gitbook.io/immersive-ads-sdk/integration/troubleshoot#id-6ebe3b5a-e6da-4390-b370-a348944ef7e3) Ad Loading Failed ![](https://pubscale.gitbook.io/immersive-ads-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fyi7AJIrqv3A12rV6WjHM%2Fblobs%2Fsml8WQsbZovwGomcKxF6%2FScreenshot_20240205-145155.jpg&width=768&dpr=3&quality=100&sign=84af6e89&sv=2) 1. Make sure you have added the App ID inside the Google AdMob settings window. 2. In the case of live ad ID (Test mode off), this may happen if there is no fill from the Google server. 3. You may encounter this issue when using Unity Editor Version 2021 or later with AdMob versions 9.6.0 or above. To fix this, ensure that you are building your application with IL2CPP as the scripting backend. ### [hashtag](https://pubscale.gitbook.io/immersive-ads-sdk/integration/troubleshoot#id-75d19063-242b-486e-b874-ed3aeb011c24) No Impressions 1. If the screen-space ad unit does not receive impressions 1. It may be due to a low resize scale. Increase the ad unit’s resize scale to ensure it is visible. 2. If you’re using Screen space - camera render mode for SS ad unit, instead, you can directly use overlay canvas render mode. 2. In dynamic 3D game environments, a world-space ad unit may not receive impressions if it is positioned too far from the camera, partially outside the camera’s viewport, or sized too small. Ensure the ad unit is completely visible, meets viewability pixel requirements, and has an adequate resize scale to satisfy viewing angle and screen coverage criteria. 1. It's important to understand how ad impressions are measured. Impressions are counted based on the IAB's Intrinsic In-Game Advertising Guidelines, which require an ad to meet both a minimum pixel and time-on-screen threshold. #### [hashtag](https://pubscale.gitbook.io/immersive-ads-sdk/integration/troubleshoot#impression_measurement_standards) Impression Measurement Industry Standards The minimum criteria for a viewable ad impression are: * **Display Ads**: At least 50% of the ad's pixels are on screen for a continuous period of at least one second. * **Video Ads**: At least 50% of the ad's pixels are on screen for a continuous period of at least two seconds. This does not need to be the first two seconds of the video. While it can be challenging to follow these guidelines throughout an entire gameplay session, they should be a key consideration when designing specific ad placements that players will encounter during planned moments in your game. 1. Make sure there is no collider between the main camera and the ad Unit. 2. Make sure the Unity Event system component is present in the scene. 3. If you are instantiating ad prefabs in real-time, try disabling the strip engine code option from the build option. ![](https://pubscale.gitbook.io/immersive-ads-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fyi7AJIrqv3A12rV6WjHM%2Fblobs%2FnRTulXK1XDYkvKSf6utW%2Ftroubleshooting-1.20b9f76e01fde8dfc365.png&width=768&dpr=3&quality=100&sign=b082c48c&sv=2) 1. If you have multiple cameras on the scene. There are 2 options to address: 1. Make sure the camera that is looking toward the ad unit has the highest priority depth value. 2. Use the [**SetActiveCameraForMeasurement**](https://pubscale.gitbook.io/immersive-ads-sdk/scripting-api/pubscalemanager#static-methods) on PubScaleManager to set a specific camera to be used for impression check. ![](https://pubscale.gitbook.io/immersive-ads-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fyi7AJIrqv3A12rV6WjHM%2Fblobs%2Fv6zmnqr12NX3UUdPnLg9%2Ftroubleshooting-2.b59384c8cc7c6ab8674a.png&width=768&dpr=3&quality=100&sign=704e3803&sv=2) ### [hashtag](https://pubscale.gitbook.io/immersive-ads-sdk/integration/troubleshoot#id-87812b65-8d1a-4fe4-adb0-06debb085501) Impression but No Click 1. Make sure there is no collider between the main camera and the ad Unit. 2. For persistent on-screen UI, you can register UI GameObjects that the SDK will ignore as obstructions when the user clicks on an ad in the game to click through using the PubScaleManager [RegisterFriendlyObstruction](https://pubscale.gitbook.io/immersive-ads-sdk/scripting-api/pubscalemanager#static-methods) API 3. Make sure the Unity Event system component is present in the scene. ### [hashtag](https://pubscale.gitbook.io/immersive-ads-sdk/integration/troubleshoot#id-87812b65-8d1a-4fe4-adb0-06debb085501-1) The game audio goes mute when there is a video ad fill * Check if Mute Other Audio Source is enabled * To prevent this behaviour, uncheck Mute Other Audio Sources in Player Settings > Other Settings ![](https://pubscale.gitbook.io/immersive-ads-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fyi7AJIrqv3A12rV6WjHM%2Fblobs%2FasK4SOBVCAGBA6cZbP5a%2Fimage.png&width=768&dpr=3&quality=100&sign=c954a712&sv=2) [PreviousIntegration Checklistchevron-left](https://pubscale.gitbook.io/immersive-ads-sdk/integration/integration-checklist) [NextImportant Changeschevron-right](https://pubscale.gitbook.io/immersive-ads-sdk/presentation/important-changes) Last updated 1 month ago * [Ad Loading Failed](https://pubscale.gitbook.io/immersive-ads-sdk/integration/troubleshoot#id-6ebe3b5a-e6da-4390-b370-a348944ef7e3) * [No Impressions](https://pubscale.gitbook.io/immersive-ads-sdk/integration/troubleshoot#id-75d19063-242b-486e-b874-ed3aeb011c24) * [Impression but No Click](https://pubscale.gitbook.io/immersive-ads-sdk/integration/troubleshoot#id-87812b65-8d1a-4fe4-adb0-06debb085501) * [The game audio goes mute when there is a video ad fill](https://pubscale.gitbook.io/immersive-ads-sdk/integration/troubleshoot#id-87812b65-8d1a-4fe4-adb0-06debb085501-1) sun-brightdesktopmoon sun-brightdesktopmoon --- # Important Changes | Immersive Ads SDK ### [hashtag](https://pubscale.gitbook.io/immersive-ads-sdk/presentation/important-changes#industry-in-transition) INDUSTRY IN TRANSITION * As the in-game native ads industry matures, the delivery of native ads is changing as well. * It's moving away from needing to assemble each element of the ad (heading text, logo image, big image, star rating, etc ) on the client side by the developer to the Demand partners providing the composed ad creative image or video ready to display in the game. * While there is a certain trade-off in creative control in the new direction, it enables better ad measurements, higher revenues due to increased advertiser trust. **AD SHAPE** A step in this direction is moving towards standardised native ad aspect ratios (Ad shapes). The SDK refers to these aspect ratios as **Fixed Aspect Ratio** **Ads**. List of currently supported Fixed aspect ratios: * 1x1 * 6x5 * 32x10 The aspect ratio can be viewed in the NativeAdDisplayHandler inspector. A single Ad object can support the display of multiple aspect ratios. ![](https://pubscale.gitbook.io/immersive-ads-sdk/~gitbook/image?url=https%3A%2F%2F2443726033-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fyi7AJIrqv3A12rV6WjHM%252Fuploads%252FgWSewGAxFcD94p2MzJnz%252FAdAspectRatio%2520Highlight%2520v260.png%3Falt%3Dmedia%26token%3D601ef70b-a299-4a2b-a604-9d99beaba568&width=768&dpr=3&quality=100&sign=9ec47589&sv=2) **AD SPACE** In addition to Ad Aspect Ratio, another important detail is the Ad Space - whether it is part of the UI (**Canvas**) or the game world (**World**). circle-info Ad Space is auto-detected by the SDK and does not need to be manually set in the NativeAdDisplayHandler * * * A majority of the demand in the new version of the SDK will serve ads delivered under the new mechanism and requires 3 simple steps for ad display customisation. #### [hashtag](https://pubscale.gitbook.io/immersive-ads-sdk/presentation/important-changes#id-1.-adjust-the-a-d-resize-scale-in-nativeadholder) **1\.** **Adjust the AD Resize Scale in NativeAdHolder** ![](https://pubscale.gitbook.io/immersive-ads-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fyi7AJIrqv3A12rV6WjHM%2Fblobs%2Fb5LRrCK6JWXGFZNl4gj7%2FNAH%2520Updated.png&width=768&dpr=3&quality=100&sign=50502cdb&sv=2) **Select a scale factor that best fits the ad within the available ad space.** \***CUSTOM RESIZE SCALE OVERRIDE:** If the NativeAdHolder supports multiple aspect ratios, you can override the scale of a specific aspect ratio in its NativeAdDisplayHandler component inspector to get a more precise fit. For instance, here is an example of a custom scale override applied to 1x1 Display Handler. ![](https://pubscale.gitbook.io/immersive-ads-sdk/~gitbook/image?url=https%3A%2F%2F2443726033-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fyi7AJIrqv3A12rV6WjHM%252Fuploads%252FS6h5j09yrNxLAGnurkyw%252FCustom%2520Scale%2520Override%2520Green%25201x1.png%3Falt%3Dmedia%26token%3D60395564-3877-45af-8867-248ab2dde9a5&width=768&dpr=3&quality=100&sign=2653e80b&sv=2) You can test an ad size in the Editor Play mode to get the best fit inside the Ad space ![](https://pubscale.gitbook.io/immersive-ads-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fyi7AJIrqv3A12rV6WjHM%2Fblobs%2FPa5AO1wDmcG7zD6eCGuH%2FOverlap%2520Visual%2520Check.png&width=768&dpr=3&quality=100&sign=a73cccb2&sv=2) #### [hashtag](https://pubscale.gitbook.io/immersive-ads-sdk/presentation/important-changes#id-2.-assign-a-creative-to-the-a-d-frame-to-make-it-stand-out) **2\. Assign a creative to the ad frame to make it stand out** ![](https://pubscale.gitbook.io/immersive-ads-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fyi7AJIrqv3A12rV6WjHM%2Fblobs%2FS0SpUMoIR81Pc9Hz9kdb%2Fad%2520frame%25201.png&width=300&dpr=3&quality=100&sign=3e7516b&sv=2) ![](https://pubscale.gitbook.io/immersive-ads-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fyi7AJIrqv3A12rV6WjHM%2Fblobs%2FWHcitdLucIOXuSGXgu9R%2Fad%2520frame%25202.png&width=300&dpr=3&quality=100&sign=2203823a&sv=2) #### [hashtag](https://pubscale.gitbook.io/immersive-ads-sdk/presentation/important-changes#id-3.-adjust-a-d-badge-for-better-ad-policy-compliance) **3\. Adjust Ad Badge for better ad policy compliance** It is important to have the ad badge clearly visible and inform the user that they are viewing an ad. You can customize the ad badge placement and image sprite as shown below. \***CUSTOM AD BADGE OVERRIDE:** Similar to applying a custom resize scale override as shown above, a custom Ad badge can be assigned in the NativeAdDisplayHandler inspector. This is useful for cases where the supported Aspect ratio vary significantly in shape (for example, 1x1 and 32x10). In this case, a custom ad badge placed at more suitable position can be assigned for the specific aspect ratio. ![](https://pubscale.gitbook.io/immersive-ads-sdk/~gitbook/image?url=https%3A%2F%2F2443726033-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fyi7AJIrqv3A12rV6WjHM%252Fuploads%252FSABL9BzT4IwehYp7DecD%252FCustom%2520Ad%2520Badge.png%3Falt%3Dmedia%26token%3Dbfd606ba-f3e0-4dbf-9546-21cf524826d2&width=768&dpr=3&quality=100&sign=413d87a5&sv=2) ### [hashtag](https://pubscale.gitbook.io/immersive-ads-sdk/presentation/important-changes#customizations-for-demand-in-custom-aspect-formats) CUSTOMIZATIONS FOR DEMAND IN CUSTOM ASPECT FORMATS * A section of the demand will still be received in the custom aspect ratio formats. While it's optional, you can follow the steps provided in the next 3 sections to customize the look of ad display objects, which render demand received in the old format (individual ad elements). ![](https://pubscale.gitbook.io/immersive-ads-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fyi7AJIrqv3A12rV6WjHM%2Fblobs%2F2PU8KpiJ8e7EJ99R2X6k%2Fhttps___content.gitbook.com_content_Ti7L0s0VAeOE03JAn3Um_blobs_ztV66RLxgWzTtHxCA2ZT_Screenshot%25202023-12-04%2520at%25208.14.41%2520PM.avif&width=768&dpr=3&quality=100&sign=fc72e6e0&sv=2) [PreviousTroubleshootchevron-left](https://pubscale.gitbook.io/immersive-ads-sdk/integration/troubleshoot) [NextAd Object Structurechevron-right](https://pubscale.gitbook.io/immersive-ads-sdk/presentation/ad-object-structure) Last updated 1 month ago * [INDUSTRY IN TRANSITION](https://pubscale.gitbook.io/immersive-ads-sdk/presentation/important-changes#industry-in-transition) * [CUSTOMIZATIONS FOR DEMAND IN CUSTOM ASPECT FORMATS](https://pubscale.gitbook.io/immersive-ads-sdk/presentation/important-changes#customizations-for-demand-in-custom-aspect-formats) sun-brightdesktopmoon Copy 1. Adjust the Ad Scale 2. Apply a Creative Frame around the Ad to make it stand out 3. Adjust Ad Badge to meet policy compliance sun-brightdesktopmoon --- # Scene setup | Immersive Ads SDK #### [hashtag](https://pubscale.gitbook.io/immersive-ads-sdk/integration/scene-setup#id-1.-configure-pubscalemanager-prefab) **1\. Configure PubScaleManager prefab** Drag and drop the PubScaleManager prefab from **Assets/PubscaleSDK/Common/Prefabs/PubScaleManager.prefab** in the first scene in your Build Settings. #### [hashtag](https://pubscale.gitbook.io/immersive-ads-sdk/integration/scene-setup#id-2.-drag-and-drop-native-a-d-unit-prefab) 2\. Drag and Drop Native Ad Unit prefab Drag and drop any of the Native ad unit prefab from the path Assets > PubScaleSDK > NativeAds > Prefabs > AdHolderUnits into your gameplay scene. circle-info If using any prefab from the “ScreenSpaceCamera” folder, then put it under a Canvas using **Screen Space-Camera** render or **Overlay render mode.** #### [hashtag](https://pubscale.gitbook.io/immersive-ads-sdk/integration/scene-setup#id-3.-assign-unique-a-d-tag-for-ad-units) **3\. Assign Unique Ad Tag for Ad Units** Ensure each ad unit has a unique Ad Tag assigned. Example: Home\_Screen\_Unit or level\_fail\_ad\_unit. This allows us to analyze the performance of each ad unit for further optimization. ![](https://pubscale.gitbook.io/immersive-ads-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fyi7AJIrqv3A12rV6WjHM%2Fblobs%2FlN5jlFc0U9saiRuHELUZ%2FAdTag.png&width=768&dpr=3&quality=100&sign=8f6d64b4&sv=2) #### [hashtag](https://pubscale.gitbook.io/immersive-ads-sdk/integration/scene-setup#id-4.-set-the-first-a-d-request-details) **4\. Set the First Ad Request Details** A new option added from v2.6.0 of the SDK gives you control over the initial caching behaviour depending on the first ad placement in your game and aspect ratio it supports (See - PRESENTATION > Important Changes section for more details) ![](https://pubscale.gitbook.io/immersive-ads-sdk/~gitbook/image?url=https%3A%2F%2F2443726033-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fyi7AJIrqv3A12rV6WjHM%252Fuploads%252FnCVoSG2SSaevRwvH4pe6%252FFirst%2520Ad%2520Request.png%3Falt%3Dmedia%26token%3D933cc01f-c750-4f3a-848f-b8aa8a3730e7&width=768&dpr=3&quality=100&sign=f4a78c43&sv=2) You can set the aspect ratio and space of the First Ad you want the SDK to cache in the PubScale Window Settings. This ensures the the right type of ad is requested by the time the first ad placement in the game is shown to the user. We have now completed setting up the ads. Let's proceed to the next step to learn how to test the ads. [PreviousApp Linkingchevron-left](https://pubscale.gitbook.io/immersive-ads-sdk/integration/app-linking) [NextTesting the integrationchevron-right](https://pubscale.gitbook.io/immersive-ads-sdk/integration/testing-the-integration) Last updated 1 month ago sun-brightdesktopmoon sun-brightdesktopmoon --- # App Linking | Immersive Ads SDK #### [hashtag](https://pubscale.gitbook.io/immersive-ads-sdk/integration/app-linking#id-1.-add-pubscale-app-id) 1\. Add PubScale app ID Enter your PubScale App ID into the PubScale Editor window located under **Window/PubScale SDK/Main** ![](https://pubscale.gitbook.io/immersive-ads-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fyi7AJIrqv3A12rV6WjHM%2Fblobs%2FHuiOXT8QV9Tw4hhakfit%2FApp%2520ID%2520PubScale%2520Window.png&width=768&dpr=3&quality=100&sign=afe589a6&sv=2) App ID from PubScale Dashboard ![](https://pubscale.gitbook.io/immersive-ads-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fyi7AJIrqv3A12rV6WjHM%2Fblobs%2FRJUL36Ja1Y7kEn8Toyjc%2FApp%2520ID%2520Android%2520500x250.png&width=768&dpr=3&quality=100&sign=dd888b60&sv=2) Android Platform ![](https://pubscale.gitbook.io/immersive-ads-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fyi7AJIrqv3A12rV6WjHM%2Fblobs%2Fgsk3DU6Auk3Grrcc0RxC%2FApp%2520ID%2520iOS500x250.png&width=768&dpr=3&quality=100&sign=2af02873&sv=2) iOS Platform #### [hashtag](https://pubscale.gitbook.io/immersive-ads-sdk/integration/app-linking#id-2.-add-admob-app-id) 2\. Add AdMob app ID Enter your AdMob app ID in Google Mobile Ads settings by following the steps below 2.1. You can open this from **Assets/Google Mobile Ads/Settings** ![](https://pubscale.gitbook.io/immersive-ads-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fyi7AJIrqv3A12rV6WjHM%2Fblobs%2FMcOmVLXjP10ZR0a9ShDi%2FUntitled%25201.png&width=768&dpr=3&quality=100&sign=41efb829&sv=2) You can open this from **Assets/Google Mobile Ads/Settings** 2.2. Add the AdMob application IDs here ![](https://pubscale.gitbook.io/immersive-ads-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fyi7AJIrqv3A12rV6WjHM%2Fblobs%2Fyv49PgHVJiv8txYCgn3Z%2FUntitled%25202.png&width=768&dpr=3&quality=100&sign=c97078c7&sv=2) Add the **AdMob application IDs** here The editor is now set up. Learn how to add ads to your scene in the next step. [PreviousAdding the SDKchevron-left](https://pubscale.gitbook.io/immersive-ads-sdk/integration/adding-the-sdk) [NextScene setupchevron-right](https://pubscale.gitbook.io/immersive-ads-sdk/integration/scene-setup) Last updated 1 month ago sun-brightdesktopmoon sun-brightdesktopmoon --- # PubScaleManager | Immersive Ads SDK The PubScaleManager handles initialization and all the requests and response caching for ads. It is a singleton component that can be accessed from anywhere. Native ads won't work if this component is missing from the scene. ### [hashtag](https://pubscale.gitbook.io/immersive-ads-sdk/scripting-api/pubscalemanager#properties) Properties Name Description **IsInitialized** Use to check if the PubScale SDK is initialized ### [hashtag](https://pubscale.gitbook.io/immersive-ads-sdk/scripting-api/pubscalemanager#static-methods) Static Methods Name Description SetActiveCameraForMeasurement By default, the SDK uses the camera with the highest depth for measurement. In scenes with multiple cameras, this default camera might not be the one rendering the primary game screen from the player's perspective. If the wrong camera is used for measurement, the SDK cannot determine if the ad is viewable, which prevents impressions from being reported. It can also cause the ad to be unclickable. Use this method to explicitly set the camera that is aligned with the player's view SetSdkToRemoveAdsPurchasedForThisSession Use this API to adjust SDKs behaviour when Remove Ads IAP is active for a session. The SDK does not persist this information as Remove Ads can be permanent or part of a time based subscription. This API needs to be set on app open every session when RemoveAds is active RegisterFriendlyObstruction You can register up to 2 UI GameObjects that the SDK will ignore as obstructions when the user clicks on an ad in the game with the intention of clicking through. A friendly UI object example could be a virtual joystick that appears on the screen wherever the user taps. UnRegisterFriendlyObstruction Use this method to un-register a UI gameobject previously registered as a friendly object. When switching scenes, you must call `UnRegisterFriendlyObstruction()` before the API call to load the new scene, instead of doing it in `OnDestroy()` . This ensures proper cleanup and prevents issues when switching scenes. [PreviousExtra Display Templateschevron-left](https://pubscale.gitbook.io/immersive-ads-sdk/presentation/extra-display-templates) [NextNativeAdHolderchevron-right](https://pubscale.gitbook.io/immersive-ads-sdk/scripting-api/nativeadholder) Last updated 1 month ago * [Properties](https://pubscale.gitbook.io/immersive-ads-sdk/scripting-api/pubscalemanager#properties) * [Static Methods](https://pubscale.gitbook.io/immersive-ads-sdk/scripting-api/pubscalemanager#static-methods) sun-brightdesktopmoon sun-brightdesktopmoon --- # Integration Checklist | Immersive Ads SDK ### [hashtag](https://pubscale.gitbook.io/immersive-ads-sdk/integration/integration-checklist#basic-checks) Basic Checks: #### [hashtag](https://pubscale.gitbook.io/immersive-ads-sdk/integration/integration-checklist#id-1.-replace-the-pubscale-placeholder) 1\. **Replace the PubScale Placeholder** It is important that you replace the PubScale placeholder with your game’s assets, which is displayed when there's no ad available. ![](https://pubscale.gitbook.io/immersive-ads-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fyi7AJIrqv3A12rV6WjHM%2Fblobs%2F1IJJihxNCEK7Ji31vpCh%2FPlaceholder1.png&width=768&dpr=3&quality=100&sign=bde3f2a8&sv=2) 2\. **Assign Unique Ad Tag for Ad Units** Ensure each ad unit has a unique Ad Tag assigned. Example: Home\_Screen\_Unit or level\_fail\_ad\_unit. This allows us to analyze the performance of each ad unit for further optimization. ![](https://pubscale.gitbook.io/immersive-ads-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fyi7AJIrqv3A12rV6WjHM%2Fblobs%2FlN5jlFc0U9saiRuHELUZ%2FAdTag.png&width=768&dpr=3&quality=100&sign=8f6d64b4&sv=2) * * * ### [hashtag](https://pubscale.gitbook.io/immersive-ads-sdk/integration/integration-checklist#visual-checks) Visual Checks: 1\. **Avoid Ad Unit Overlap with Screen Elements** Ensure ad units do not overlap with other on-screen elements. ![](https://pubscale.gitbook.io/immersive-ads-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fyi7AJIrqv3A12rV6WjHM%2Fblobs%2FQbYtiE7OIW9yHGpjFWIg%2FAdUnit%2520Overlap.gif&width=768&dpr=3&quality=100&sign=51bd0ba5&sv=2) * * * ### [hashtag](https://pubscale.gitbook.io/immersive-ads-sdk/integration/integration-checklist#functional-checks) Functional Checks: #### [hashtag](https://pubscale.gitbook.io/immersive-ads-sdk/integration/integration-checklist#id-1.-ensure-impressions-and-clicks-are-registered) 1\. **Ensure Impressions and Clicks are registered** Build the application to an actual device. Verify if the impression indicator turns green when the ad is in the camera view and if the click indicator turns green when you tap on the ad. circle-info If the Impression indicator is not green, [find the fix here.](https://pubscale.gitbook.io/immersive-ads-sdk/integration/troubleshoot#id-75d19063-242b-486e-b874-ed3aeb011c24) If the Click indicator is not green, [find the fix here.](https://pubscale.gitbook.io/immersive-ads-sdk/integration/troubleshoot#id-87812b65-8d1a-4fe4-adb0-06debb085501) ![](https://pubscale.gitbook.io/immersive-ads-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fyi7AJIrqv3A12rV6WjHM%2Fblobs%2FJ8AFWrXwRJRJ0t5iAp1q%2Fclick%2520check.png&width=768&dpr=3&quality=100&sign=5d36fc82&sv=2) #### [hashtag](https://pubscale.gitbook.io/immersive-ads-sdk/integration/integration-checklist#id-2.-disable-a-d-unit-during-popups-and-overlays) 2\. **Disable Ad unit During Popups and Overlays** Ensure that when a popup or overlay appears over an ad unit, the background ad unit is disabled to prevent accidental clicks, avoiding potential policy issues due to high CTR. circle-info To disable the ad, call HideAd() on nativeAdHolder, and to enable it again use UnHideAd() circle-exclamation Ensure the ad unit is disabled even when it's completely hidden by the overlay. ![](https://pubscale.gitbook.io/immersive-ads-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fyi7AJIrqv3A12rV6WjHM%2Fblobs%2FnOcWD5wvWMSl7jtjcT1D%2FAdUnit%2520Overlay.gif&width=768&dpr=3&quality=100&sign=7668e791&sv=2) #### [hashtag](https://pubscale.gitbook.io/immersive-ads-sdk/integration/integration-checklist#id-3.-enable-status-visualizer) 3\. **Enable Status Visualizer:** Before sending a build to our QA for testing, ensure the Status Visualizer is enabled. circle-info **You don't need to disable it;** **it will be automatically hidden** when Test Mode is disabled in PubScale Settings. ![](https://pubscale.gitbook.io/immersive-ads-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fyi7AJIrqv3A12rV6WjHM%2Fblobs%2FbEnZ8ngIWno9uww2VpKz%2FStatusVisualizer.png&width=768&dpr=3&quality=100&sign=d6a73f69&sv=2) #### [hashtag](https://pubscale.gitbook.io/immersive-ads-sdk/integration/integration-checklist#id-4.-a-d-request-management) 4\. **Ad Request Management:** **To Allow Subsequent Ad Requests:** circle-exclamation This is to be done only if your ad is placed on **panels or pop-ups** If your ad is placed on panels or popups, disable AutoFetch() and manually call FetchAd() only when the UI panel or overlay is active. When fetching an ad manually, include a counter. If it has been over 15 seconds since the last ad impression, fetch a new one; otherwise, continue showing the current ad. circle-info Subscribing to Event\_OnAdLoaded on NativeAdHolder records the last ad load time. This prevents multiple ad requests, especially during frequent panel openings and closings. **Avoid Ad Unit Triggering Multiple Requests:** To address this issue, ensure that AutoFetch() is disabled whenever FetchAd() is called manually. **5\. Rollout with A/B Test** ![](https://pubscale.gitbook.io/immersive-ads-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fyi7AJIrqv3A12rV6WjHM%2Fblobs%2FLDwImFjlmPOUlgbipNpH%2F165_benefits_AB_testing_illustration_blog.png&width=768&dpr=3&quality=100&sign=81c68e09&sv=2) If you plan to roll out with an A/B test where ads are shown to some of the users while others don't see them, make sure to follow the steps below: 1. The first step would be to **remove the PubScaleManager prefab from the first scene** 2. Once a response is received from the A/B test service (such as Firebase Remote config) 1. If the user is to be shown ads, you can instantiate PubScaleManager like any GameObject or it can also be loaded from the Resources folder 2. Once the PubScaleManager is instantiated, it will begin Caching Ads 3. In addition to the above, the **default state of all Native ad Game Objects needs to be Disabled.** Otherwise, when the native ad object requests an ad, the PubScaleManager will get dynamically instantiated (lazy loaded) and begin caching ads. The main goal is to prevent the PubScaleManager from being loaded for users who are not supposed to see ads. If active, it will cache ads that will not get shown, impacting Show Rate negatively driving down ecpm. Doing the above steps (2) and (3) ensures the A/B test happens correctly. [PreviousTesting the integrationchevron-left](https://pubscale.gitbook.io/immersive-ads-sdk/integration/testing-the-integration) [NextTroubleshootchevron-right](https://pubscale.gitbook.io/immersive-ads-sdk/integration/troubleshoot) Last updated 1 month ago * [Basic Checks:](https://pubscale.gitbook.io/immersive-ads-sdk/integration/integration-checklist#basic-checks) * [Visual Checks:](https://pubscale.gitbook.io/immersive-ads-sdk/integration/integration-checklist#visual-checks) * [Functional Checks:](https://pubscale.gitbook.io/immersive-ads-sdk/integration/integration-checklist#functional-checks) sun-brightdesktopmoon sun-brightdesktopmoon --- # NativeAdHolder | Immersive Ads SDK Native Ad Holders communicate with the PubScaleManager to send ad requests and receive ad fills. It is the packaging unit of a single native ad placement in your scene and handles how and when to make Ad requests. ### [hashtag](https://pubscale.gitbook.io/immersive-ads-sdk/scripting-api/nativeadholder#properties) Properties: Name Description **AdResizeScale** Allows adjusting the ad scale globally for all Fixed aspect ratio Display handlers to fit inside the available space for the ad. To use a custom value for a specific aspect ratio, it can be done in the NativeAdDisplayHandler inspector settings. AdBadgeFrame Assign a global Ad badge for all Fixed aspect ratio ad display handlers. Alternatively, similar AdResizeScale, a custom ad badge can be assigned in the NativeAdDisplayHandler to override the global Ad Badge. **adTag** This tag is used to identify an Ad placement in your game to track log events. Make sure they are unique. **canvas** Reference to the parent canvas component. **placeholder** This game object will be shown before the Ad loads and will get disabled once the ad is loaded. **adDisplay** Reference to the default [NativeAdDisplayHandlerarrow-up-right](https://github.com/GreedyGame/sdkone-unity_native_ads_plugin/wiki/NativeAdDisplayHandler) component which will determine how the native ad is shown once it is loaded. **UseExtraFormats (**Custom Aspect Formats**)** Boolean that tells the SDK to search the extra landscape and portrait formats at runtime when set to true. Otherwise, it will use only the default format assigned to adDisplay field. **landscapeAdFormats** List of NativeAdDisplayHandlers tailored for Ads with a Landscape product image. **portraitAdFormats** List of NativeAdDisplayHandler tailored for Ads with a Portrait product image. **nonMediaType** List of NativeAdDisplayHandler which handles cases when the advertisement does not have a product image. **AD FETCH OPTIONS** **AutoFetch** If enabled, the Ad will automatically be requested in OnEnable for the Game Object **TriggerFetchWithCollider** If enabled, the Ad request will be made when a collider with a certain tag enters inside the bounds of the attached collider component. Make sure the IsTrigger is checked for the collider **TriggerOnCollisionWithTag** The game object Tag that will trigger the Ad request if TriggerFetchWithCollider is enabled If both the above are deselected, the Ad Holder expects you to invoke FetchAd() manually from another script **RefreshRate** The Native Ad Holder makes a new ad request using this delay value after an impression is registered on the current ad displayed. The recommended value is 30s after an impression. ### [hashtag](https://pubscale.gitbook.io/immersive-ads-sdk/scripting-api/nativeadholder#public-methods) Public Methods: All these methods can be overloaded Name Description **FetchAd** Generates request for a new Ad. **HideAd** (⚠️ Native Ads can register click events even if they are overlapped by other UI components.) The AdDisplayHandler is disabled, and the placeholder object is activated. This prevents the ad from registering an unintentional click. **UnHideAd** Re-show the ad once the overlapping UI is not active **StopRefresh** Stops the Ad unit refresh calls. **ResetTriggerByColliderAdFetchCondition** Resets the condition to trigger a FetchAd call when using Collider as trigger ### [hashtag](https://pubscale.gitbook.io/immersive-ads-sdk/scripting-api/nativeadholder#events) Events Name Description **Event\_AdRequest** The event is raised before the referenced **NativeAdHolder** component requests a new Ad from the ad cache. **Event\_OnNativeAdActive** This static event is raised when any **NativeAdHolder** component gets activated in the scene. **Event\_OnAdLoaded** The event is raised when the referenced **NativeAdHolder** component receives its Ad fill from the ad cache. **Event\_OnAdFillNotReceivedInThisAttempt** The event is raised when there is no ad present in the cache at the time of the request by the NativeAdHolder **Event\_OnAdImpression** The event is raised when the referenced **NativeAdHolder** component registers an impression for the loaded Ad. **Event\_OnAdClicked** The event is raised when the referenced **NativeAdHolder** component registers a click for the active Ad. **Event\_OnAdValuePaid** The event is raised when the impression-level revenue is available for the current impression. * Please make sure to subscribe to Event\_AdRequest in the Awake() callback in order not to miss the Auto-Fetch **Event\_AdRequest,** which is triggered in OnEnable() [PreviousPubScaleManagerchevron-left](https://pubscale.gitbook.io/immersive-ads-sdk/scripting-api/pubscalemanager) Last updated 1 month ago * [Properties:](https://pubscale.gitbook.io/immersive-ads-sdk/scripting-api/nativeadholder#properties) * [Public Methods:](https://pubscale.gitbook.io/immersive-ads-sdk/scripting-api/nativeadholder#public-methods) * [Events](https://pubscale.gitbook.io/immersive-ads-sdk/scripting-api/nativeadholder#events) sun-brightdesktopmoon sun-brightdesktopmoon --- # Changing Ad Visuals | Immersive Ads SDK Customizing the look of the ads is as simple as switching out image assets on specific game objects in the hierarchy and changing the text and image colors. Additionally, you may also reposition and resize some of the UI elements. ![](https://pubscale.gitbook.io/immersive-ads-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fyi7AJIrqv3A12rV6WjHM%2Fblobs%2FFMiZCOwx25tzDwZ5tnBe%2FScreenshot%25202023-12-04%2520at%25209.29.36%2520AM.png&width=768&dpr=3&quality=100&sign=d295a370&sv=2) MediaLandscapeSimple For this example, we consider the MediaLandscapeSimple display handler template. The steps discussed will apply to all other display templates as well. **CHANGING IMAGE ASSETS** The starting point of changing the look of the ad is by changing the ad background. This can be done by changing the source image of the Image component on the Display Template root object. ![](https://pubscale.gitbook.io/immersive-ads-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fyi7AJIrqv3A12rV6WjHM%2Fblobs%2FVYWJ9lIjx8Cwiw8mNqZX%2FScreenshot%25202023-12-04%2520at%25209.45.46%2520AM.png&width=768&dpr=3&quality=100&sign=1912aef8&sv=2) Let's consider a Game with a Starry Night visual theme ![](https://pubscale.gitbook.io/immersive-ads-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fyi7AJIrqv3A12rV6WjHM%2Fblobs%2FVnmaAJi6ZudHXSrwFGQI%2FScreenshot%25202023-12-04%2520at%25209.48.43%2520AM.png&width=768&dpr=3&quality=100&sign=68220456&sv=2) After changing the Ad background, we can change the source images on certain child objects to further customize the look of the ad. OBJ NAME CHANGE ? COMMENTS BigImg No This gets assigned at runtime by the Advertiser Large image asset AdIconImg No This gets assigned at runtime by the Advertiser Icon image asset ButtonCta Yes You can use the button UI asset from the game here AdTag Yes You can also switch out the default ad tag with your custom AdTag asset ![](https://pubscale.gitbook.io/immersive-ads-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fyi7AJIrqv3A12rV6WjHM%2Fblobs%2FNV3FysVTyQTsnfGse7ow%2FScreenshot%25202023-12-04%2520at%252010.15.12%2520AM.png&width=768&dpr=3&quality=100&sign=277af648&sv=2) There could be other image objects in the ad display hierarchy, which serve only an aesthetic purpose and can be customized. An example of such an object would be the lower rectangle panel in the above image which groups the logo, headline, rating, and CTA button. **CHANGING COLORS** In addition to colors on the image component, the text colors can be changed as per the colors in your game OBJ NAME CHANGE? COMMENTS AdHeadlineTxt Yes Found in all Display Templates as it is a required field AdCtaTxt Yes Found in all Display Templates as it is a required field BodyTxt Yes Is an optional field. Not present in all Display Templates. StarTypeTxt Yes Is an optional field BigImg No Will be set to white at runtime to preserve the look of the Large image provided by the Advertiser AdIconImg No Will be set to white at runtime to preserve the look of the Small Icon image provided by the Advertiser ![](https://pubscale.gitbook.io/immersive-ads-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fyi7AJIrqv3A12rV6WjHM%2Fblobs%2Fr2KXijv2kDfreQ3Db5Dc%2Fg5.png&width=768&dpr=3&quality=100&sign=76987fc5&sv=2) \*NOTE: The Logo and Large Product Image on the right are SAMPLES for illustration purposes * * * And that's all there is to customize the look of an Ad Display Template. You can go ahead and customize other Display Templates as well - MediaLandscapeBlur, MediaPotrait, and NonMedia. The same steps apply with minor variations. Here's an example of the ad in a game with wooden visual theme: ![](https://pubscale.gitbook.io/immersive-ads-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fyi7AJIrqv3A12rV6WjHM%2Fblobs%2FcCFJaye24DLZTvUOCy6K%2FScreenshot%25202023-12-04%2520at%25202.36.56%2520PM.png&width=768&dpr=3&quality=100&sign=3479e185&sv=2) In addition to this, you can adjust the position of individual elements by changing values in the RectTransform and the built-in Unity UI Layout components. * * * CHANGING AD SIZE: The Ad size can be changed by adjusting the Rect Transform scale. The important pointer to keep in mind is to make sure the scaling is uniform (Same values for X and Y) CHANGING AD SHAPE: You can change the Ad Shape by changing the width and height value of the Rect Transform on the Root Object (SS\_NativeAd or WS\_NativeAd) ![](https://pubscale.gitbook.io/immersive-ads-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fyi7AJIrqv3A12rV6WjHM%2Fblobs%2F8ZTczcpj9Rv5Y8O52uFK%2FScreenshot%25202023-12-04%2520at%25204.58.51%2520PM.png&width=768&dpr=3&quality=100&sign=f81af3a3&sv=2) This will impact both MediaType as well NonMediaType display templates If you want to change only one of these categories, then instead of the Root object you can adjust the Left, Right, Top, and Bottom padding values on the MediaType or NonMediaType objects. ![](https://pubscale.gitbook.io/immersive-ads-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fyi7AJIrqv3A12rV6WjHM%2Fblobs%2FiUBaXDuujA5XfwHIXeg4%2FScreenshot%25202023-12-04%2520at%25208.14.41%2520PM.png&width=768&dpr=3&quality=100&sign=c1cc9008&sv=2) In this case, you could disable the Image component on the root game object (SS\_NativeAd or WS\_NativeAd) to remove the light gray background. Once new values are set, you may need to adjust the properties on certain child elements depending on the structure of the Display template. Make sure to test adjusted values across different display resolutions [PreviousAd Object Structurechevron-left](https://pubscale.gitbook.io/immersive-ads-sdk/presentation/ad-object-structure) [NextExtra Display Templateschevron-right](https://pubscale.gitbook.io/immersive-ads-sdk/presentation/extra-display-templates) Last updated 1 month ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Extra Display Templates | Immersive Ads SDK ### [hashtag](https://pubscale.gitbook.io/immersive-ads-sdk/presentation/extra-display-templates#using-a-single-display-template) USING A SINGLE DISPLAY TEMPLATE To use a single display template (for instance MediaLandscapeSimple), do the following in the NativeAdHolder component. 1. Assign MediaLandscapeSimple to the DEFAULT DISPLAY FORMAT field 2. Uncheck the ADD EXTRA DISPLAY FORMATS field ![](https://pubscale.gitbook.io/immersive-ads-sdk/~gitbook/image?url=https%3A%2F%2F2443726033-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fyi7AJIrqv3A12rV6WjHM%252Fuploads%252FmKe0Gq8EKvMvSkPrloln%252F1%2520ADD%2520EXTRA%2520FORMATS.png%3Falt%3Dmedia%26token%3D1a0bab28-8b98-4d93-9e2b-1af5acf7d9f6&width=768&dpr=3&quality=100&sign=b7b9f69d&sv=2) * * * ### [hashtag](https://pubscale.gitbook.io/immersive-ads-sdk/presentation/extra-display-templates#additional-display-templates) ADDITIONAL DISPLAY TEMPLATES The Display Handler Templates used in the default Ad Prefabs are: 1. MediaLandscapeSimple 2. MediaLandscapeBlur 3. MediaPotrait 4. NonMedia In addition to the above display templates, the SDK provides the following templates: 1. LogoHeadlineCompact (New! added in 1.4.2) 2. LongHorizontalSimple 3. LongHorizontalSimple2 4. LongVerticalSimple 5. TemplateCombo1 1. Combo1 Landscape 2. Combo1 Portrait 6. TemplateCombo2 1. Combo2 Landscape 2. Combo2 Portrait 7. TemplateCombo3 1. Combo3 Landscape 2. Combo3 Portrait These can be found in the path: Assets/PubscaleSDK/NativeAds/Prefabs/DisplayTemplates/Dynamic/ ![](https://pubscale.gitbook.io/immersive-ads-sdk/~gitbook/image?url=https%3A%2F%2Fcontent.gitbook.com%2Fcontent%2Fyi7AJIrqv3A12rV6WjHM%2Fblobs%2FY6FGqA9ypCZYBLO0mosw%2FLogoCompact.png&width=768&dpr=3&quality=100&sign=a42a2c0e&sv=2) New LogoHeadlineCompact template circle-exclamation Make sure to assign the reference to NativeAdHolder in the CheckLogo script if using this template TO USE THESE FORMATS: 1. Drag and drop the Display Template as a child to the SS\_NativeAd or (WS\_NativeAd > Canvas) object 2. If using a Single Template, follow the steps from the section above 3. If using multiple templates 1. Make sure the ADD EXTRA DISPLAY FORMATS is checked 2. Remove any display templates that you don't want to use from the Display options array 3. Add the new display templates to the array for the SDK to pick at runtime depending on the Ad big media aspect ratio 4. Assign the Default Display Template 5. Make sure the Status Visualizer is visible! ![](https://pubscale.gitbook.io/immersive-ads-sdk/~gitbook/image?url=https%3A%2F%2F2443726033-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fyi7AJIrqv3A12rV6WjHM%252Fuploads%252FxbdGt596nuVSRqh9twCH%252F2%2520ADD%2520EXTRA%2520FORMATS.png%3Falt%3Dmedia%26token%3Db763022b-4a82-448d-91c1-8d5c96793e33&width=768&dpr=3&quality=100&sign=aef3d99b&sv=2) * * * ### [hashtag](https://pubscale.gitbook.io/immersive-ads-sdk/presentation/extra-display-templates#custom-display-templates-create-your-own-template) CUSTOM DISPLAY TEMPLATES (CREATE YOUR OWN TEMPLATE) * If you create your own Custom Display Template, create a variant for portrait big image media as well. * This will ensure the Ad unit looks good when the ad's big image media is in Portrait aspect ratio. * In this case, you have to add your custom display variants to the Display Options array as shown in the steps below 1. Set **\`****ADD EXTRA DISPLAY FORMATS****\`** field to Enabled 2. Remove any default display templates that you don't want to use from the Display options array 3. Add your Custom display templates to the array for the SDK to pick at runtime, depending on the ad's big media aspect ratio 4. Make sure the Status Visualizer is visible 5. Done! ![](https://pubscale.gitbook.io/immersive-ads-sdk/~gitbook/image?url=https%3A%2F%2F2443726033-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fyi7AJIrqv3A12rV6WjHM%252Fuploads%252FiCpnR8ZVMNeDXFIgOIYo%252F3%2520ADD%2520EXTRA%2520FORMATS%2520v2.6.0.png%3Falt%3Dmedia%26token%3D952243a5-fd3e-4383-87f8-7cc7d7c73907&width=768&dpr=3&quality=100&sign=5f700b5a&sv=2) Custom Display Templates [PreviousChanging Ad Visualschevron-left](https://pubscale.gitbook.io/immersive-ads-sdk/presentation/changing-ad-visuals) [NextPubScaleManagerchevron-right](https://pubscale.gitbook.io/immersive-ads-sdk/scripting-api/pubscalemanager) Last updated 1 month ago * [USING A SINGLE DISPLAY TEMPLATE](https://pubscale.gitbook.io/immersive-ads-sdk/presentation/extra-display-templates#using-a-single-display-template) * [ADDITIONAL DISPLAY TEMPLATES](https://pubscale.gitbook.io/immersive-ads-sdk/presentation/extra-display-templates#additional-display-templates) * [CUSTOM DISPLAY TEMPLATES (CREATE YOUR OWN TEMPLATE)](https://pubscale.gitbook.io/immersive-ads-sdk/presentation/extra-display-templates#custom-display-templates-create-your-own-template) sun-brightdesktopmoon sun-brightdesktopmoon ---