What is a session

An Interact session is one remote browser on a residential exit. You create it with the API, connect your tool to it, then stop it when you are done.

In the dashboard this is Create session, Session ID, Ready, and Stop. In the API the same ideas are POST /v1/sessions, id, state, and DELETE /v1/sessions/{session_id}.

Auth for every /v1 call: header X-API-Key.

Base URL for checks right now:

https://interact.geonode.io

Production host in the OpenAPI servers list: https://interact.geonode.io.

Create a session

POST /v1/sessions?wait=true

Query wait:

ValueWhat happens
true (default)Answer once the session is ready or has failed (about 6 s).
falseAnswer 202 at once with state: "starting". Poll GET /v1/sessions/{id} until ready, or failed with the reason in error.

Request

request.sh
curl -X POST "https://interact.geonode.io/v1/sessions?wait=true" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "country": "us",
    "engine": "chromium",
    "ttl_seconds": 1800
  }'

Body fields come from SessionRequest. Defaults if you omit them: country us, engine chromium, ttl_seconds 1800, idle_timeout_seconds 300, record false.

Response

Successful create returns a SessionRecord. With wait=true you often get 201 and state: "ready". With wait=false you can get 202 and state: "starting".

response.json
{
  "id": "aa11a2a310b4",
  "state": "ready",
  "engine": "chromium",
  "country": "us",
  "exit_ip": "203.0.113.10",
  "error": null,
  "ended_reason": null,
  "connect_url": "https://interact.geonode.io/<session-token>",
  "seconds_left": 295.8
}
FieldMeaning
idSession id. Use it in get, delete, and recording paths.
statestarting, ready, failed, or gone. A hand-over or end can show a short transitional value.
connect_urlAddress your tool connects to. The token in it is the credential.
errorWhy a session failed or ended early, in a sentence.
ended_reasonOne word after it ends. Null while it lives.

List and get

list.sh
curl "https://interact.geonode.io/v1/sessions" \
  -H "X-API-Key: YOUR_API_KEY"

GET /v1/sessions returns SessionList: your sessions, a plan block, and optional warning.

get.sh
curl "https://interact.geonode.io/v1/sessions/SESSION_ID" \
  -H "X-API-Key: YOUR_API_KEY"

Stop a session

delete.sh
curl -X DELETE "https://interact.geonode.io/v1/sessions/SESSION_ID" \
  -H "X-API-Key: YOUR_API_KEY"

A successful delete returns 204. An already-ended session returns 404.

Next

Was this page helpful?

On this page