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:
https://s2s.adjust.com/third_party_sharingUse a POST request to interact with the API. You can also send endpoint parameters in the URL or as form data.
Required parameters
| Parameter name | Value |
|---|---|
| gps_adid, idfa | Device ID string. At least one device ID is required. The API supports the same device IDs supported by other Adjust S2S APIs. |
| s2s | Always 1 |
| app_token | The app token |
| sharing | enable or disable to allow or prevent third-party sharing, respectively. |
| partner_sharing_settings | Updated settings for partners. |
| granular_third_party_sharing_options | Granular third-party sharing options for partners. |
Global setting
The all parameter is a flexible shortcut to simplify partner-sharing settings:
allas a partner name means the setting applies to all partners.allas 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 name | Value |
|---|---|
| partnerName | The ID or name of the partner whose sharing settings you want to update. Download the full list of available partners |
| key | The data you want to stop or start sharing with the partner. |
| value | Whether 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
- install
Here,
- If you disable sharing of
session, all its child metrics will also be disabled. - If you disable sharing of
sessionbut enablereattribution, all its child metrics exceptreattributionwill be disabled. - If you disable sharing of
sessionbut enableinstall, all the child metrics ofsessionexceptinstallwill be disabled. Child metrics ofinstallwill remain enabled. - If you enable sharing of
sessionbut disableinstall, all its child metrics ofsessionexceptinstallwill be enabled. Child metrics ofinstallwill 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.
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_sharingDisable all sharing except session activity
Adjust will stop sharing all partner data except session and its related events (like install or reattribution).
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_sharingAllow only session activity to Partner A
All partner data sharing is disabled except session and its related events (like install or reattribution) for PartnerA.
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_sharingDisable only dynamic callbacks
This disables sharing with dynamically created callbacks, without affecting regular partner integrations.
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_sharingError 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.
{ "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.
{ “error”: "Third party sharing failed (<error_message>)"}400
The request is improperly formatted, doesn’t contain mandatory parameters, or contains no valid data.
{ "error": "Third party sharing failed (App not found)"}Provide consent data to Google (Digital Markets Act compliance)
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:
| Key | Value | Description |
|---|---|---|
| eea |
| 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 |
| 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 |
| 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 |
| 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
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" }