adjust-icon

Server-to-server (S2S) sessions

Sessions are the base of all attribution and measurement in Adjust. They trigger when a user resumes using an app from the background or when they open the app. Use the S2S Session API to record each user session in your app.

Before you begin

Authentication

Set up S2S Security to guarantee the security of your S2S sessions and protect against spoofed requests. This requires each incoming request to carry an authentication token generated in your Adjust dashboard. Requests that don’t carry the token or that carry an incorrect token are rejected by Adjust’s servers.

Record sessions

Adjust groups sessions to save resources. This means there must be a gap of at least 30 minutes after a session, before the Adjust server accepts a new session as triggered.

endpoint
https://s2s.adjust.com/session

Headers

Payload

Find the full list of parameters in the table below.

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.

Adjust supports the following Google DMA parameters for S2S session and install requests. Adjust expects the parameters to be in request Form.

You must 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" \
-H 'Authorization: Bearer ADD_YOUR_AUTH_TOKEN_HERE' \
-H 'User-Agent: Adjust Streaming Job (akka-http)' \
-d "app_token=a1234b2x3a4o&app_version=Roku%2FDVP-10.5+%2810.5.0.0010%29&created_at_unix=1543915806015&environment=production&os_name=android&rida=099aa0bc-d123-4567-8999-a1b7c50767b1&s2s=1" \
"https://s2s.adjust.com/session"
Response
{
"Host": "s2s.adjust.com",
"Path": "/session",
"Method": "POST",
"ReceivedAt": "2022-01-01T17:00:01.030986068Z",
"Header": {
"Connection": ["close"],
"User-Agent": ["Adjust Streaming Job (akka-http)"],
"Authorization": ["Bearer ADD_YOUR_AUTH_TOKEN_HERE"],
"Content-Length": ["0"],
"X-Adjust-Forwarded-For": ["71.142.112.183", "34.221.136.124"],
"X-Adjust-Forwarded-Proto": ["https"]
},
"Form": {
"s2s": ["1"],
"rida": ["099aa0bc-d123-4567-8999-a1b7c50767b1"],
"os_name": ["android"],
"app_token": ["a1234b2x3a4o"],
"app_version": ["Roku/DVP-10.5 (10.5.0.0010)"],
"environment": ["production"],
"created_at_unix": ["1543915806015"]
}
}