SDK Specifications

Overview

This page defines the API specifications required to configure SDK for using UnifID and its integrated ID vendors. You can integrate and use multiple ID vendors in a one-time configuration.

Pass Hashed Values (Email Address Or Phone Number)

  1. Hash the PII data using any of the following hashing protocols: SHA1, SHA256, or MD5,
  2. Use the InMobi SDK Initialization API using the InMobi account ID. For more information, see iOS or Android Initialization. If you are using mediation, your mediation takes care of the Initialization,
  3. Use InMobiUserDataTypes to capture the hashed PII data.
  4. Build the request using InMobiUserDataModel.
  5. Push the PII data using UnifID Push API (see ‘UnifID API Specification’). Call this API for every session.
  6. In case you're a new user, you must call InMobiUnifiedIdService.reset() before InMobiUnifiedIdService.push(userDataModel).

Pass Mobile Ad ID (MAID)

  1. Use the InMobi SDK Initialization API using the InMobi account ID. For more information, see iOS or Android Initialization. If you are using mediation, your mediation takes care of the Initialization,
  2. Call the UnifID Push API for MAID: InMobiUnifiedIdService.push(null). Call this API for every session.

Note

It is recommended to pre-initialize the InMobi SDK before initializing the mediation SDK, but it is not mandatory. This ensures seamless integration as UnifID APIs are enabled before monetization begins. This step doesn't affect the mediation stack.

UnifID API Specification

IMUnifiedIdService is a new class and it consists of the following APIs.

API 

Syntax 

Description 

Push 

<span data-contrast="none" xml:lang="EN-US">push(</span><span data-contrast="none" xml:lang="EN-US">data: </span><span data-contrast="none" xml:lang="EN-US">IMUserDataModel</span><span data-contrast="none" xml:lang="EN-US">)</span> 

You should use this API to submit the hashed PII data to the InMobi Id Service. Every time you call this API, the SDK requests InMobi ID Service 
 
You should call this API at the beginning of every app session.

Push InMobiUnifiedIdService.push(null);

You should use this API to pass the MAID (Mobile Ad ID) to the InMobi ID Service. Every time you call this API, the SDK requests InMobi ID Service.

You should call this API at the beginning of every app session.

Fetch 

<span data-contrast="none" xml:lang="EN-US">fetch</span><span data-contrast="none" xml:lang="EN-US">Unified</span><span data-contrast="none" xml:lang="EN-US">Ids</span><span data-contrast="none" xml:lang="EN-US">(</span><span data-contrast="none" xml:lang="EN-US">delegate: </span><span data-contrast="none" xml:lang="EN-US">Unified</span><span data-contrast="none" xml:lang="EN-US">IdInterface</span><span data-contrast="none" xml:lang="EN-US">)</span>

You should use this to get the UnifiedIDs. If the UnfIiedIDs expire, the InMobi Id service receives the call to refresh the IDs passed to you. 

Reset 

<span data-contrast="none" xml:lang="EN-US">reset(</span><span data-contrast="none" xml:lang="EN-US">)</span>

You should use this API to clear all the UnifIDs and signatures stored locally in the SDK. 

Publisher Provided ID setPublisherProvidedUnifiedID <key-value> - <parners> You should use this API to pass Universal IDs obtained from your direct relationship with ID vendors. See the full list in the ’IM SDK’ section.

IMUserDataTypes and IMUserDataModel  

IMUserDataTypes class holds the different variants of user data that you pass. First, you should create an instance IMUserDataTypes and set the corresponding values for the IMUserDataModel instance. The system passes the instance IMUserDataModel to fetch the function.

IMUserDataTypes 

Property

Type

Purpose

md5 

String 

To provide hashed data using md5 hashing algorithm. 

sha1 String To provide hashed data using SHA1 hashing algorithm.

sha256 

String 

To provide hashed data using SHA256 hashing algorithm. 

IMUserDataModel 

Property

Type

Purpose

phoneNumber 

IMUserDataTypes 

To provide a phone number in different variants (md5, sha1, and so on).

emailId 

IMUserDataTypes 

To provide email id in different variants (md5, sha1, and so on.)

Extras 

Dictionary 

To provide any extra information. 

You must note some data types, such as email ID, are a prerequisite for some Identity partners.

Callbacks 

SDK calls the “onFetchCompleted” function to notify you about successfully submitting the hashed PII data to the InMobi ID Service. It also shares the list of Universal IDs in the form of a dictionary. SDK doesn't return expired Universal IDs and calls this function only on the Main Thread. 

Function

Syntax

onFetchCompleted 

onFetchCompleted(response: Dictionary?, error: Error?) 

If you set an error object, the SDK calls this function to notify you about the error while submitting the hashed PII data to the InMobi Id Service. 

IMSDK 

You should use this function to pass the universal IDs obtained through your direct partnership with different ID partners (e.g. LiveRamp, ID5, etc.), upstream to demand partners, or to other ad exchanges. It helps you to monetize your inventory across the ecosystem. Essentially, it is an existing API within the SDK that enables you to pass universal IDs to InMobi. When both universal IDs and the SDK UnifID service are present, the SDK UnifID service takes higher precedence.

Function 

Syntax

setPublisherProvidedUnifiedId 

setPublisherProvidedUnifiedId(ids: Dictionary) 

Here is the list of supported ID Partners. In the "key" value, the publisher needs to adhere to the naming convention (all lowercase).

ID Partners Key Value
LiveRamp liveramp.com
ID5 id5-sync.com
BritePool britepool.com
The Trade Desk (UID2) uidapi.com
LiveIntent liveintent.com
PubCommon pubcid.org
Nextroll nextroll.com
Parrable parrable.com
TapAd tapad.com
ZeoTap zeotap.com
Criteo criteo.com
UIDTTD adserver.org
Net netid.de
NeustarFabrick neustar.biz
Halo audigent.com
Lotame Panorama crwdcntrl.net
Merkle merkleinc.com
Quantcast quantcast.com
IntentIQ intentiq.com
DMD hcn.health
IDx dx.lat
Verizon Media Connect verizonmedia.com
Media Wallah Open Link mediawallahscript.com
NovatiqSnowflake novatiq.com
DeepIntent deepintent.com
Admixer admixer.net
Amx amxrtb.com
Epsilon pubcid.org

Internal APIs 

To create an ad request, the SDK uses the getUids API internally. 

Function

Syntax

getUids 

getUids() -&gt; Dictionary? 

If you set an error object, the SDK calls this function to notify you about the error while submitting the hashed PII data to the InMobi Id Service.

On This Page

Last Updated on: 21 Dec, 2023