adjust-icon

S2S third-party sharing

With Adjust, you can manage how data is shared with third parties for statistics purposes. This gives your users greater choice over how their data is handled. Here, you can find instructions on how to (re-)enable and disable third-party sharing server-to-server (S2S).

Endpoint

The API endpoint request address is:

Endpoint
https://s2s.adjust.com/third_party_sharing

Use a POST request to interact with the API. You can also send endpoint parameters in the URL or as form data.

Required parameters

Parameter nameValue
gps_adid, idfaDevice ID string. At least one device ID is required. The API supports the same device IDs supported by other Adjust S2S APIs.
s2sAlways 1
app_tokenThe app token
sharingenable or disable to allow or prevent third-party sharing, respectively.
partner_sharing_settingsUpdated settings for partners.
granular_third_party_sharing_optionsGranular third-party sharing options for partners.

Global setting

The all parameter is a flexible shortcut to simplify partner-sharing settings:

  • all as a partner name means the setting applies to all partners.
  • all as an activity name (like installs or sessions) means the setting applies to all activity types.
  • You can combine both to apply or restrict all activities for all partners.

Use this to quickly disable (or allow) sharing broadly, then selectively turn sharing back on for specific partners or activity types.

Update partner sharing settings

To update third-party sharing settings for individual partners, you need to pass your updated settings as a partner_sharing_settings parameter. Third party sharing settings must be passed as a URL-encoded form object. You can pass multiple objects to change multiple settings at once.

You MUST pass the following keys in each partner sharing settings form:

Parameter nameValue
partnerNameThe ID or name of the partner whose sharing settings you want to update. Download the full list of available partners
keyThe data you want to stop or start sharing with the partner.
valueWhether to enable (true) or disable (false) sharing the specified data with the partner.

You can use the key to specify which metrics you want to disable or re-enable. If you want to enable/disable sharing all metrics, you can use the all key. The full list of available metrics is available below:

  • ad_revenue
  • all
  • update
  • att_update
  • event
  • install
  • reattribution
  • reattribution_reinstall
  • reinstall
  • rejected_install
  • rejected_reattribution
  • sdk_click
  • sdk_info
  • session
  • subscription
  • uninstall

Metrics group

When you set a false value against a metric for a partner, Adjust stops sharing the metric along with all the child metrics under the group with the partner. These nested groups are:

  • session
    • install
      • rejected_install
    • reinstall
    • reattribution
    • rejected_reattribution
    • reattribution_reinstall

Here,

  • If you disable sharing of session, all its child metrics will also be disabled.
  • If you disable sharing of session but enable reattribution, all its child metrics except reattribution will be disabled.
  • If you disable sharing of session but enable install, all the child metrics of session except install will be disabled. Child metrics of install will remain enabled.
  • If you enable sharing of session but disable install, all its child metrics of session except install will be enabled. Child metrics of install will remain disabled.

Use-cases

Below are a few common use cases. These examples use Android SDK and curl for S2S. iOS implementation follows the same logic with platform-specific syntax.

Disable all partner activity sharing except Partner A

Adjust will share all data only with Partner A.

Request
curl -G \
--data-urlencode 's2s=1' \
--data-urlencode 'app_token=36wbd8gmlvsw' \
--data-urlencode 'idfa=105C1794-7CF8-43A3-9C3F-B0DCEA2D29A9' \
--data-urlencode 'partner_sharing_settings={"all":{"all":false},"PartnerA":{"all":true}}' \
https://s2s.adjust.com/third_party_sharing

Disable all sharing except session activity

Adjust will stop sharing all partner data except session and its related events (like install or reattribution).

Request
curl -G \
--data-urlencode 's2s=1' \
--data-urlencode 'app_token=36wbd8gmlvsw' \
--data-urlencode 'idfa=105C1794-7CF8-43A3-9C3F-B0DCEA2D29A9' \
--data-urlencode 'partner_sharing_settings={"all":{"all":false,"session":true}}' \
https://s2s.adjust.com/third_party_sharing

Allow only session activity to Partner A

All partner data sharing is disabled except session and its related events (like install or reattribution) for PartnerA.

Request
curl -G \
--data-urlencode 's2s=1' \
--data-urlencode 'app_token=36wbd8gmlvsw' \
--data-urlencode 'idfa=105C1794-7CF8-43A3-9C3F-B0DCEA2D29A9' \
--data-urlencode 'partner_sharing_settings={"all":{"all":false},"PartnerA":{"session":true}}' \
https://s2s.adjust.com/third_party_sharing

Disable only dynamic callbacks

This disables sharing with dynamically created callbacks, without affecting regular partner integrations.

Request
curl -G \
--data-urlencode 's2s=1' \
--data-urlencode 'app_token=36wbd8gmlvsw' \
--data-urlencode 'idfa=105C1794-7CF8-43A3-9C3F-B0DCEA2D29A9' \
--data-urlencode 'partner_sharing_settings={"dynamic_callbacks":{"all":false}}' \
https://s2s.adjust.com/third_party_sharing

Error handling

The third_party_sharing endpoint uses HTTP response status codes to communicate the status of each request. The following status codes are returned:

200

All parts of the request are valid and are applied.

Response
{
"status": "OK"
}

202

Some parts of the request are invalid, such as nonexistent partner IDs or improperly formatted sharing options. The parts that are valid are applied, and the endpoint returns details of the issues with the request.

Response
{
“error”: "Third party sharing failed (<error_message>)"
}

400

The request is improperly formatted, doesn’t contain mandatory parameters, or contains no valid data.

Response
{
"error": "Third party sharing failed (App not found)"
}

To comply with the EU’s Digital Markets Act (DMA), Google Ads and the Google Marketing Platform require explicit consent to receive Adjust’s attribution requests to their APIs.

In the event a user changes their consent response, you can use Adjust’s re-enable/disable third party sharing API to share this with us. Pass the following parameters in your request:

KeyValueDescription
eea
  • 1 = users are in the EEA and the DMA applies
  • 0 = users are not in the EEA and the DMA does not apply
The eea parameter informs Google whether users are located in the EEA and thus whether the European regulations, including the DMA, apply to this user and conversion. The parameter type is boolean.
ad_personalization
  • 1 = user consented
  • 0 = user did not consent
For Google Ads. The ad_personalization parameter informs whether users consented to being served personalized ads via Google Ads after installing the app, i.e. whether Google can retarget the users.
ad_user_data
  • 1 = user consented
  • 0 = user did not consent
The ad_user_data parameter informs Google whether users granted consent to personal data being shared for measurement purposes or not. The consent applies to all the Core Platform Services (CPS) advertisers have specified in their Google Ads and Google Marketing Platform UI.
npa
  • 1 = user did not consent
  • 0 = user consented
For Google Marketing Platform. The npa parameter informs whether users consented to being served personalized ads via Google Marketing Platform after installing the app, i.e. whether Google can retarget the users.

Note that you need to send the ad_personalization parameter if you are working with Google Ads, and the npa parameter if you are working with Google Marketing Platform.

Example

Request
curl -X POST \
'https://s2s.adjust.com/third_party_sharing?s2s=1&sharing=enable&app_token=abc123abc123&gps_adid=10820328-872d-43a2-9786-0ccc748335d9' \
-H 'Content-Type: application/json' \
-d '{
"granular_third_party_sharing_options": {
"google_dma": {
"ad_personalization": "1",
"eea": "1",
"ad_user_data": "1",
"npa": "0"
}