Server-to-Server SESSION Endpoint API Reference

SESSION Endpoint API Reference

Server-to-Server Use Case

The Singular REST API enables direct server-to-server integration as an alternative to the SDK. The LAUNCH or Session Endpoint enables session tracking in your applications. When your app forwards device-specific data to your server, which then transmits the data to Singular's servers, the Singular platform then processes this information for: Install Attribution, ReEngagement Attribution, and Retention Metrics. This processed data automatically populates your reports, export logs, and configured postbacks, providing comprehensive analytics for your marketing campaigns.

While the SDK automatically collects device and app data, the S2S approach requires you to:

  1. Collect required data points from your app
  2. Forward this data to your server
  3. Send it to Singular via REST API
  4. Pass the Singular response back to the app

session-data-flow.png

Key Points

  • Flexibility: Full control over data collection and transmission
  • Feature Parity: Supports all SDK functionality when proper data is provided
  • Integration Path: Client → Your Server → Singular API
  • Real-time processing: One request at a time, no batch processing
  • Sequential data flow: Events must be processed in chronological order
  • Data Deduplication: Singular does not deduplicate received data. It is recommended to send one(1) successful Request and save logs in the event a Request should be replayed.
  • Data Validation: Device-level data is permanent and cannot be deleted once ingested. Implement thorough data validation before sending data to Singular to ensure accuracy.

Session Management

The LAUNCH endpoint is used to notify Singular of an App Open event for a new User Session.

  • Session initialization (launch request) required for:
    • Fresh app installations
    • App launches from terminated state
    • App returning to foreground from background
  • Session must be established before any event tracking
  • Invalid session order will result in data inconsistencies
  • It is recommended to implement a Session timeout and only send Singular the SESSION notification if the App has not been used within the last 1 min. If a user backgrounds the App, and then Foregrounds the App within 1 min or less, this should not trigger a Singular SESSION, but if they Foreground in greater than 1 minute this should trigger a SESSION.
  • In order to support deep linking, a Session must always be sent for the App Open with the openURL in the 'open_uri' parameter.

Getting Started

The Session endpoint documentation provides:

Be sure to review the advanced options of Singular's Server-to-Server (S2S) integration which require the Session Notification Endpoint to include additional parameters. Learn about the Advanced Options here.

Reporting Sessions

The most basic integration with Singular involves notifying Singular when a User session occurs, allowing Singular to trigger several internal processes:

  • If it's the first session for the app on the specific device, Singular recognizes a new install and triggers the install attribution process.
  • If the session qualifies as a re-engagement session, Singular triggers the re-engagement attribution process (learn more in the Re-engagement FAQ).
  • Otherwise, Singular marks it as a session, which is used to track user activity and retention metrics.

The timing of a session request and subsequent event requests to the Singular servers is critical:

  1. A single session must be received prior to any events.
    For example, the Singular SDK will trigger a session on the App Open when a user starts using the app, then in-app events may be sent following the session. If the user places the app in the background for an extended period of time (greater than 1 minute) the session would time-out. Another session would be sent when the app is brought back to the foreground. It is recommended to use App lifecycle events and a timer to help manage your session management and regulate the session requests to Singular.
  2. Events occuring in the app must be sent in real-time and after their respective session.

Session API Endpoint

HTTP Method and Session Endpoint

GET https://s2s.singular.net/api/v1/launch

Required Parameters

The following table lists the required parameters that this endpoint supports. All of the parameters listed are query parameters.

GET /api/v1/launch?param1=value1&param2=value2

 

  • All required parameters must be included in SESSION API requests
  • Parameters should follow specified format and data types
Required Parameters
API Key
Parameter Description
a
string

The a parameter specifies the Singular SDK Key.

Retrieve the SDK Key from the Singular UI, under Developer Tools in the Main Menu.

Note: Do not use the reporting API Key as this will result in rejected data.

 

Example Value:
sdkKey_afdadsf7asf56
Device Identifier Parameters
Parameter Description
idfa

Supported Platforms:

  • iOS
string

The idfa parameter specifies the Identifier for Advertisers (IDFA) which helps advertisers track and attribute user actions (e.g., ad clicks, app installs) to specific campaigns, enabling precise ad targeting and campaign optimization.

Starting with iOS 14.5, users must opt-in via the App Tracking Transparency (ATT) framework before apps can access the IDFA. If users do not opt-in to IDFA then the IDFA will be unavailable resulting in limiting tracking capabilities.

 

Example Value:
DFC5A647-9043-4699-B2A5-76F03A97064B
Parameter Description
idfv

Supported Platforms:

  • iOS
string

The idfv parameter specifies the Identifier for Vendors (IDFV), a unique identifier assigned by Apple to a device, which is specific to a particular vendor or developer. It remains consistent across all apps from the same vendor on a given device, allowing the vendor to track user behavior and interactions across their app ecosystem without identifying the user personally.

 

Example Value:
21DB6612-09B3-4ECC-84AC-B353B0AF1334
Parameter Description
aifa

Supported Platforms:

  • Android
    (Google Play Devices)
string

The aifa parameter specifies the Google Advertising Identifier (GAID), also known as AIFA in Singular or Android Advertising ID (AAID). This identifier is a unique, user-resettable identifier assigned to Android devices. It helps advertisers and app developers track and attribute user actions (e.g., ad clicks, app installs) across apps to specific campaigns, enabling precise ad targeting and campaign optimization, while maintaining user privacy.

  • If the AIFA is unavailable then omit the parameter from the request.
  • Only required on Google Play Devices.
  • Omit the parameter on Non-Google Play devices.
  • Do not pass NULL or empty string in the request.
  • How to retrieve the AIFA Identifier

 

Example Value:
8ecd7512-2864-440c-93f3-a3cabe62525b
Parameter Description
asid

Supported Platforms:

  • Android
    (Google Play Devices)
string

The asid parameter specifies the Android App Set ID. The ASID provides a way for developers to track users across their own apps in a privacy-conscious manner. It is particularly useful for analytics and fraud prevention but cannot be used for advertising purposes such as personalized ads or measurement.

  • The ASID is required on all request for Google Play Devices, regardless of GAID/AIFA presence.
  • Omit the parameter on Non-Google Play devices.
  • Do not pass NULL or empty string in the request.
  • How to retrieve the ASID Identifier

 

Example Value:
edee92a2-7b2f-45f4-a509-840f170fc6d9
Parameter Description
amid

Supported Platforms:

  • Android
    (Amazon Devices without Google Play Services)
string

The amid parameter specifies the Advertising ID is a user-resettable, unique identifier that helps protect the privacy of the user. If you collect information about a user’s behavior to display interest-based ads, or to generate analytics, you must use the Advertising ID; no other identifier or tracking method may be used. Users can reset the Advertising ID or opt out of interest-based ads altogether.

  • The AMID is required on all request for Amazon Devices without Google Play Services.
  • Omit the parameter if AMID is unavailable.
  • Do not pass NULL or empty string in the request.
  • How to retrieve the AMID Identifier

 

Example Value:
df07c7dc-cea7-4a89-b328-810ff5acb15d
Parameter Description
oaid

Supported Platforms:

  • Android
    (Chinese-manufactured Devices without Google Play Services)
string

The oaid parameter specifies Open Advertising Identifier (OAID). The OAID is a unique, anonymous identifier used for advertising purposes on Android devices, particularly those manufactured in China. It was introduced by the Mobile Security Alliance (MSA) as an alternative to Google's Advertising ID (GAID) for devices where Google Play Services are unavailable or not supported, such as in the Chinese market.

The OAID is primarily used for advertising attribution and user tracking in environments where Google Play Services are restricted, allowing advertisers and developers to track user behavior while maintaining anonymity.

OAID is available on most Chinese-manufactured Android devices, including those from brands like Huawei, Xiaomi, and others. It can be accessed using the MSA SDK or Huawei Mobile Services (HMS).

  • The OAID is required on Chinese-manufactured Android devices without Google Play Services.
  • Omit the parameter if OAID is unavailable.
  • Do not pass NULL or empty string in the request.
  • How to retrieve the OAID Identifier

 

Example Value:
01234567-89abc-defe-dcba-987654321012
Parameter Description
andi

Supported Platforms:

  • Android
    (Non Google Play devices)
string

The andi parameter specifies the Android ID which is a unique 64-bit identifier generated by the Android operating system when a device is first set up. It is designed to be persistent across the lifetime of the device, but it can be reset under certain conditions such as a factory reset.

The Android ID is unique to each device and, starting from Android 8.0 (Oreo), it is scoped per app and per user. This means that different apps on the same device will receive different Android IDs unless they share the same signing key.

The Android ID remains constant unless the device undergoes a factory reset or if an app is uninstalled and reinstalled after an OTA (over-the-air) update.

  • The ANDI is prohibited for use on Google Play Devices. Use the AIFA and ASID identifiers mentioned above.
  • The ANDI may be sent to Singular only if no other identifiers are available, and the App is not hosted on Google Play Store.
  • Omit the parameter if other identifiers are available.
  • Do not pass NULL or empty string in the request.
  • How to retrieve the ANDI Identifier

 

Example Value:
fc8d449516de0dfb
Parameter Description
sdid

Supported Platforms:

  • PC
  • Xbox
  • Playstation
  • Nintendo
  • MetaQuest
  • CTV
string

The sdid parameter specifies the Singular Device ID. This value is a client-side generated UUIDv4 representing a unique app install. This is the only device identifier used for PC and Console Applications.

 

Example Value:
40009df0-d618-4d81-9da1-cbb3337b8dec
Parameter Description
sing

Supported Platforms:

  • Restricted for special use-cases
  • Contact your Solution Engineer or CSM for more information
string

The sing parameter is restricted to Enterprise customers and specifies a Client defined identifier. Only used in special uses where all other identifiers are not available. This identifier must be enabled by Singular Solution Engineer on an App-by-App bases.

 

Example Value:
da534a95-1b1b-47d4-94b6-07955ec85177
Device Parameters
Parameter Description
p
string

The p parameter specifies the platform of the App.

The following list contains the allowed case-sensitive parameter values:

  • Android
  • iOS
  • PC
  • Xbox
  • Playstation
  • Nintendo
  • MetaQuest
  • CTV

 

Example Value:
Android
Parameter Description
ip
string

The ip parameter specifies the public (IPV4) IP Address of the device. IPV6 is not supported.

 

Example Value:
172.58.29.235
Parameter Description
ve
string

The ve parameter specifies the OS Version of the device at session time.

 

Example Value:
9.2
Parameter Description
ma

Supported Platforms:

  • Android
  • iOS
string

The ma parameter specifies the Make of the device hardware, typically the consumer-facing name. This parameter must be used with the model parameter.

How to retrieve the Device Make

 

Examples:
Samsung, LG, Apple
Parameter Description
mo

Supported Platforms:

  • Android
  • iOS
string

The mo parameter specifies the Model of the device hardware. This parameter must be used with the make parameter.

How to retrieve the Device Model

 

Examples:
iPhone 4S, Galaxy SIII
Parameter Description
lc

Supported Platforms:

  • Android
  • iOS
string

The lc parameter specifies the IETF locale tag for the device, using two-letter language and country code separated by an underscore.

How to retrieve the Device Locale

 

Example Value:
en_US
Parameter Description
bd

Supported Platforms:

  • Android
  • iOS
string

The bd parameter specifies the Build of the device, URL-encoded.

How to retrieve the Device Build

 

Example Value:
Build%2F13D15
Application Parameters
Parameter Description
i
string

The i parameter specifies the App Identifier.

This is the Package Name for Android or the Bundle ID for iOS or of your application. case-sensitive parameter values:

  • Package Name for Android
  • Bundle ID for iOS
  • Your designated identifier for PC, Xbox, Playstation, Nintendo, MetaQuest, or CTV

 

Example Value:
com.singular.app
Parameter Description
app_v
string

The app_v parameter specifies the Application Version.

 

Examples:
1.2.3
Parameter Description
install
string

The install parameter specifies if this Session represents the first Session after an Install or Re-Install. Pass 'true' if the session was the first after installing the app or 'false' if the app is already installed and this is a subsequent session or app open. This parameter is required for Reinstall tracking capabilities.

 

Examples:
true
Parameter Description
install_time

Supported Platforms:

  • Android
  • iOS
int

The install_time parameter specifies the time of the first app install as UNIX time. To retrieve this value, use the link on the platform.

 

Example Value:
1510040127
Parameter Description
update_time

Supported Platforms:

  • Android
  • iOS
int

The update_time parameter specifies the time of the last app update as UNIX time. To retrieve this value, use the link on the platform.

 

Example Value:
1510040127
Parameter Description
att_authorization_status

Supported Platforms:

  • iOS
int

The att_authorization_status parameter specifies the App Tracking Transparency(ATT) status code. Starting with iOS 14.5, the App Tracking Transparency (ATT) prompt is required in order to access the IDFA identifier.

Note: Even if you don't implement the ATT prompt, we require that you pass the ATT authorization status with the value '0', indicating "undetermined".

Supported values are:

  • 0 - Undetermined.
  • 1 - Restricted, the user disabled app tracking.
  • 2 - Denied, the user denied authorization.
  • 3 - Authorized, the user granted authorization.

 

Examples:
3
Fraud Parameters
Parameter Description
install_source

Supported Platforms:

  • Android
  • PC
string

The install_source parameter specifies the Install Source Package Name on Android. The recommended values for the install source on PC is the installing store.

Supported Install Store Names for PC include:

  • steam
  • epic
  • microsoftstore
  • humblestore
  • gog
  • selfdistributed

 

Example for Android (Google Play Store):

com.vending.android
Parameter Description
install_receipt

Supported Platforms:

  • iOS
string

The install_receipt parameter specifies the receipt received from the install. Learn how to retrieve it at iOS Install Receipt

 

Example of a base64 encoded receipt string from iOS:
MIJF9wYJKoZIhvcNAQcCoIJF6DCCReQCAQExCzAJBgUrDgMCGgUAMII1mAYJKoZIhvcNAQcBoII1iQSCNYUxgjWBMAoCAQgCAQEEAhYAMAoCARQCAQEEAgwAMAsCAQECAQEEAwIBADALAgELAgEBBAMCAQAwCwIBDwIBAQQDAgEAMAsCARACAQEEAwIBADALAgEZAgEBBAMCAQMwDAIBAwIBAQQEDAIyNTAMAgEKAgEBBAQWAjQrMAwCAQ4CAQEEBAICAM8wDQIBDQIBAQQFAgMCIuAwDQIBEwIBAQQFDAMxLjAwDgIBCQIBAQQGAgRQMjU1
Deeplinking Parameters
Parameter Description
openuri

Supported Platforms:

  • Android
  • iOS
URL-encoded string

The openuri parameter specifies if the app opened via any deep link, iOS Universal Link, or Android App Link and you should provide the URL-encoded open URL value.

Open URL:
myapp://home/page?queryparam1=value1&queryparam2=value2

 

Example Value:
myapp%3A%2F%2Fhome%2Fpage%3Fqueryparam1%3Dvalue1%26queryparam2%3Dvalue2
Parameter Description
ddl_enabled

Supported Platforms:

  • Android
  • iOS
string

The ddl_enabled parameter specifies if the app is enabled to support Deferred deep links. Pass 'true' if the server expects a deferred deep link URL to be returned or 'false' otherwise.

 

Example Value:
true

 

Example Response:
{
  "deferred_deeplink": "myapp://deferred-deeplink",
  "status": "ok",
  "deferred_passthrough": "passthroughvalue"
}
Parameter Description
singular_link_resolve_required

Supported Platforms:

  • Android
  • iOS
string

The singular_link_resolve_required parameter is used to resolve a Singular short link. Must be sent with value in the 'openuri' that is a Singular short link. Pass 'true' if the server expects the expanded short link (long link) to be returned or 'false' otherwise. See Short Link handling.

 

Example Value:
true

 

Example Response:
{
  "status":"ok",
  "resolved_singular_link":"https://myapp.sng.link/A59c0/nha7?_dl=myapp%3A%2F%2Fdeeplink&_ddl=myapp%3A%2F%2Fdeferred-deeplink&_p=passthroughvalue"
}
Advanced Attribution Parameters
Parameter Description
install_ref

Supported Platforms:

  • Android
    (Google Play Devices)
JSON URL-encoded string

The install_ref parameter specifies if the Google Install Referrer Information. The install referrer contains information about who sent a user to the Google Play Store. When the install referrer is available to Singular, it provides the most accurate way to attribute installs. Retrieve this value and pass it along to Singular on the first session notification call.

{
   "installBeginTimestampSeconds":"1568939453",
   "referrer":"utm_source=google-play&utm_medium=organic",
   "clickTimestampSeconds":"0",
   "referrer_source":"service",
   "current_device_time":"1568944524"
}

It is required for some important Singular features, such as receiving Facebook data in our User-Level Exports, sharing it with Data Destinations, and sending postbacks.

Google Play collects referrer information when a user arrives at the store. If the user later installs the app they were directed to, Google Play makes the information available to the app. For more information, see Google's developer documentation.

 

Example Value:
%7B%22installBeginTimestampSeconds%22%3A%221568939453%22%2C%22referrer%22%3A%22utm_source%3Dgoogle-play%26amp%3Butm_medium%3Dorganic%22%2C%22clickTimestampSeconds%22%3A%220%22%2C%22referrer_source%22%3A%22service%22%2C%22current_device_time%22%3A%221568944524%22%7D
Parameter Description
meta_ref

Supported Platforms:

  • Android
    (Google Play Devices)
JSON URL-encoded string

The meta_ref parameter specifies the "Meta Referrer" which is an Android-specific measurement solution introduced by Facebook to allow advertisers access to granular user-level attribution data for Android app installs (see Facebook's data policies). It is comprised of implementing both "Google Play Install Referrer" (see "Passing Google Install Referrer") and "Meta Install Referrer" technologies for app install measurement. Read more about Meta Referrer in the FAQ on the topic.

{
  "install_referrer": {
    "utm_source":"apps.facebook.com",
    "utm_campaign": "fb4a",
    "utm_content": {
      "source":{
        "data":"c7e6b890bf18a059c2185650bdb1af3dced7...",
        "nonce":"24859720343e2381daee9f39ae61"
        },
      "app":533744218636280,
      "t":1731181327
      },
    "is_ct":1,
    "actual_timestamp":1731181444,
  }
}

 

Example Value:
%7B%22install_referrer%22%3A%7B%22utm_source%22%3A%22apps.facebook.com%22%2C%22utm_campaign%22%3A%22fb4a%22%2C%22utm_content%22%3A%7B%22source%22%3A%7B%22data%22%3A%22c7e6b890bf18a059c2185650bdb1af3dced7...%22%2C%22nonce%22%3A%2224859720343e2381daee9f39ae61%22%7D%2C%22app%22%3A533744218636280%2C%22t%22%3A1731181327%7D%2C%22is_ct%22%3A1%2C%22actual_timestamp%22%3A1731181444%2C%7D%7D
Parameter Description
attribution_token

Supported Platforms:

  • iOS
string

The attribution_token parameter specifies the Apple Search Ads attribution token retrieved on iOS 14.3+ via the AdServices framework.

Retrieve the attribution token using attributionToken() as soon the app initializes for the first time after an install or reinstall.

 

Example Value:
KztLg%2FIkNsWDMuBMOU%2BySnkPU5myJb4OFmeaMUE%2BTqQJP1HWL%2FBdpQKNHSnghf0uQpWDsdNcoWHHlXzrRta22Aww4QsUdPGKLwAAAVADAAAAwgAAAIAOMB3LOGJVmcso4G42C3bF8API7suoQgqrM9xfbMKtjpn0anD4Xca2Ma8fMa%2FZLBqWalHYmm58zs4bH1XUDtBcSex1d80D4AhnnPoSYFukr%2ACfLCEnT2lHurPb5cPPQ17ewCd3ctuuZYGHuvV66AkU1ExJUguciTXTNEgY%2Fc19rQAAAB%2BF8udKcAQxkREhEtyGQGRUFydziffiLHBN7bXKSHPFAAAAnwGYh9H%2BPP4rEQGnbnTiQUnkfqgfKQAAAIYCCLjE6nnxqwDQPb4%2FF0Wve%2FVnSwwUxYGsi2a3V5dioUgCzty2kAG8kUsNjk0rU0Z0UrOhvCR%2FGfLXQv7HsMIZlbeKoHast6%2BXfiFsA2x244gztybPDecoGAvsmOeBKxjJqPDGqYxIpBgGaggGg1wonia%2BhxqjcLpEKG%2F%2F%2FEOZb3Jdf%2FaN%2FQABBEkLAAA%3D

Request Body

Do not provide a request body when calling this method. The request must be sent using the GET method with query parameters.

 

Request Examples

The following code samples may not represent all supported parameters. When implementing the request be sure to include all required parameters as listed above, and validate that the correct values are being passed before sending data from a production instance. It is advised to uses a unique `i` parameter (application identifier) for development and testing.

 

PYTHON CURL HTTP JAVA

PYTHON

import requests

params = {
    'a': 'sdk_key_here',
    'p': 'Android',
    'i': 'com.singular.app',
    'ip': '10.1.2.3',
    've': '9.2',
    'ma': 'samsung',
    'mo': 'SM-G935F',
    'lc': 'en_US',
    'aifa': '8ecd7512-2864-440c-93f3-a3cabe62525b',
    'asid': 'edee92a2-7b2f-45f4-a509-840f170fc6d9',
    'install': 'true',
    'n': 'MyCoolAppName',
    'bd': 'Build/13D15',
    'app_v': '1.2.3',
    'openuri': 'myapp://home/page?queryparam1=value1',
    'ddl_enabled': 'true',
    'install_source': 'com.android.vending',
    'install_time': 1510040127,
    'update_time': 1510090877
}

response = requests.get('https://s2s.singular.net/api/v1/launch', params=params)
print(response.json())

 

Optional Parameters

The following table lists the optional parameters that this endpoint supports. All of the parameters listed are query parameters.

Optional Parameters
Timestamp Parameters
Parameter Description
utime
int

The utime parameter specifies the Time of the session in 10 digit UNIX time.

 

Example Value:

1483228800
Parameter Description
umilisec
int

The umilisec parameter specifies the of Time of the session in milliseconds 13 digit UNIX time.

 

Example Value:

1483228800000
Device & Network Parameters
Parameter Description
global_properties
JSON URL-encoded string

The global_properties parameter accepts a URL-encoded JSON object containing up to 5 key-value pairs. Each key and value can be a maximum length of 200 characters.

{"key1":"value1","key2":"value2"}

The JSON Object must be:

  • Converted to a JSON string and URL-encoded

 

Example Value:

%7B%22key1%22%3A%22value1%22%2C%22key2%22%3A%22value2%22%7D
Parameter Description
use_ip
string

The use_ip parameter tells Singular to extract the IP Address from the HTTP request instead of the 'ip' parameter. Pass 'true' to use this feature.

  • Using this parameter prevents Singular from geo-locating the device based on IP Address. You may supply the two-letter country code of the user in the optional 'country' parameter.
  • This parameter is mutually exclusive to the 'ip' parameter. DO NOT use this with the 'ip' parameter.
  • To avoid data rejection, you must supply either 'ip' or the 'use_ip' parameter on the request.

 

Example Value:

true
Parameter Description
country
string

The country parameter should contain the ISO 3166-1 alpha-2 two-letter country code of the user at the time of the session execution. This parameter is required only when:

  • The 'ip' parameter is not available
  • If the 'ip' parameter is available, the country will be automatically determined from the IP address, and the 'country' parameter is not needed.

 

Example Value:

US
Parameter Description
ua
URL-encoded string

The ua parameter specifies the User Agent of the device.

Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148

The value must be URL-encoded.

 

Example Value:

Mozilla%2F5.0%20(iPhone%3B%20CPU%20iPhone%20OS%2014_0%20like%20Mac%20OS%20X)%20AppleWebKit%2F605.1.15%20(KHTML%2C%20like%20Gecko)%20Mobile%2F15E148
Parameter Description
c

Supported Platforms:

  • iOS
  • Android
string

The c parameter specifies the Network Connection type 'wifi' or 'carrier'.

 

Example Value:

wifi
Parameter Description
cn

Supported Platforms:

  • iOS
  • Android
string

The cn parameter specifies the Carrier name of the internet provider.

 

Example Value:

Comcast
Uninstall Tracking Support
Parameter Description
apns_token

Supported Platforms:

  • iOS
string

The apns_token parameter specifies the Apple Push Notification Service (APNS) Device Token.

 

Example Value:

b0adf7c9730763f88e1a048e28c68a9f806ed032fb522debff5bfba010a9b052
Parameter Description
fcm

Supported Platforms:

  • Android
string

The fcm parameter specifies the Firebase Cloud Messaging Device Token.

  • Required for Android Uninstall Tracking
  • How to retrieve the FCM Token
  • Then pass the device token in the fcm parameter when reporting the session to Singular, as in the following example:

 

Example Value:

bk3RNwTe3H0CI2k_HHwgIpoDKCIZvvD...MExUdFQ3P1
Data Privacy
Parameter Description
data_sharing_options
JSON URL-encoded string

The data_sharing_options parameter specifies the end-user's consent to share information. If set, this value must be persisted and passed on every subsequent 'SESSION' and 'EVENT' request for the user.

  • To indicate that the user consented (opted-in) to share their information pass 'false':
    {"limit_data_sharing":false}
  • If the user refused then pass 'true':
    {"limit_data_sharing":true}

The value must be a URL-encoded JSON String.

 

Example Value:

%7B%22limit_data_sharing%22%3Atrue%7D
Parameter Description
dnt

Supported Platforms:

  • Android
  • iOS
int

The dnt parameter specifies the status of Do Not Track. Pass 1 if do not track is enabled or 0 if do not track is disabled.

 

Example Value:
0
Parameter Description
dntoff

Supported Platforms:

  • iOS
  • Android
int

The dntoff parameter specifies if Do Not Track is Off. Pass 0 if "do not track" is enabled or 1 if "do not track" is disabled.

 

Example Value:
1
Cross Device Support
Parameter Description
custom_user_id
string

The custom_user_id parameter specifies your internal User ID.

 

Example Value:

123456789abcd
iOS SkAdNetwork Support
Parameter Description
skan_conversion_value

Supported Platforms:

  • iOS
int

The skan_conversion_value parameter specifies the latest SKAdNetwork conversion value at the time of this session notification (learn more about SKAdNetwork implementation).

 

Example Value:

7
Parameter Description
skan_first_call_timestamp

Supported Platforms:

  • iOS
int

The skan_first_call_timestamp parameter specifies the Unix timestamp of the first call to the underlying SkAdNetwork API (learn more about SKAdNetwork implementation).

 

Example Value:

1483228800
Parameter Description
skan_last_call_timestamp

Supported Platforms:

  • iOS
int

The skan_last_call_timestamp parameter specifies the Unix timestamp of the latest call to the underlying SkAdNetwork API at the time of this session notification (learn more about SKAdNetwork implementation).

 

Example Value:

1483228800

Session Testing

After integrating the server-to-server integration, it is essential to verify that Singular receives data before you go live with a product instance. Refer to our testing guide for more details. At a high level the following steps should be followed:

  1. Obtain your test device Advertising ID and add the ID in the Singular SDK Console.
  2. Open the Singular SDK Console and add the device identifier to start capturing data.
  3. Override the App Identifier with a development App Identifier (com.singular.app.dev) to keep test data and events separate from production data.
  4. Build or Open the App from a terminated state
  5. Validate the App Open is sent to your server with all required Singular data points
  6. Validate your server triggers the Session Notification to the Singular 'launch' endpoint with all required data points.
  7. After a few seconds, the Session event should be displayed in the Singular SDK Console.
    s2s_session.png
  8. Repeat the test, to validate that the App Open triggers the Session from every App entry or “Foreground” operation.
Important Verifications

Confirm that the Session Event occurs on App Open or to Foreground and before the Event is received.

If you see the Session in the SDK Console, you have completed an end-to-end test of SESSION handling!