curl --request GET \
--url https://api.phone-harness.com/sessions/{sid} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.phone-harness.com/sessions/{sid}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.phone-harness.com/sessions/{sid}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "abc123def456",
"state": "ready",
"provider": "shlut",
"device": "Android",
"close_requested": null,
"cleanup_pending": false,
"cleanup_status": null,
"billing_mode": "metered",
"phone": null,
"watch_url": "https://viewer.example.com/opaque-read-only-link",
"screen": {
"w": 720,
"h": 1280
},
"age_s": 150,
"ready_age_s": 10,
"idle_s": 0,
"expires_at": 1800000900,
"timeout_seconds": 900,
"adb": {
"host": "live.phone-harness.com",
"port": 22220,
"code": "ph_mfwcc5nknqaod034nwojzw0lzq",
"expires_at": 1800000900
}
}{
"error": "<string>",
"code": "<string>",
"state": "<string>",
"unsupported": true,
"outcome": "unknown",
"id": "<string>",
"request_key": "<string>",
"cleanup_complete": true,
"balance_cents": 123,
"session": "<string>",
"session_limit": 123,
"active_session_count": 123,
"available_session_slots": 123
}{
"error": "<string>",
"code": "<string>",
"state": "<string>",
"unsupported": true,
"outcome": "unknown",
"id": "<string>",
"request_key": "<string>",
"cleanup_complete": true,
"balance_cents": 123,
"session": "<string>",
"session_limit": 123,
"active_session_count": 123,
"available_session_slots": 123
}{
"error": "<string>",
"code": "<string>",
"state": "<string>",
"unsupported": true,
"outcome": "unknown",
"id": "<string>",
"request_key": "<string>",
"cleanup_complete": true,
"balance_cents": 123,
"session": "<string>",
"session_limit": 123,
"active_session_count": 123,
"available_session_slots": 123
}{
"error": "<string>",
"code": "<string>",
"state": "<string>",
"unsupported": true,
"outcome": "unknown",
"id": "<string>",
"request_key": "<string>",
"cleanup_complete": true,
"balance_cents": 123,
"session": "<string>",
"session_limit": 123,
"active_session_count": 123,
"available_session_slots": 123
}Get a session
Inspect state, deadline, geometry and advertised operations. A valid read-only watch grant may read only its own session. Ready does not mean a browser frame has been displayed.
curl --request GET \
--url https://api.phone-harness.com/sessions/{sid} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.phone-harness.com/sessions/{sid}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.phone-harness.com/sessions/{sid}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "abc123def456",
"state": "ready",
"provider": "shlut",
"device": "Android",
"close_requested": null,
"cleanup_pending": false,
"cleanup_status": null,
"billing_mode": "metered",
"phone": null,
"watch_url": "https://viewer.example.com/opaque-read-only-link",
"screen": {
"w": 720,
"h": 1280
},
"age_s": 150,
"ready_age_s": 10,
"idle_s": 0,
"expires_at": 1800000900,
"timeout_seconds": 900,
"adb": {
"host": "live.phone-harness.com",
"port": 22220,
"code": "ph_mfwcc5nknqaod034nwojzw0lzq",
"expires_at": 1800000900
}
}{
"error": "<string>",
"code": "<string>",
"state": "<string>",
"unsupported": true,
"outcome": "unknown",
"id": "<string>",
"request_key": "<string>",
"cleanup_complete": true,
"balance_cents": 123,
"session": "<string>",
"session_limit": 123,
"active_session_count": 123,
"available_session_slots": 123
}{
"error": "<string>",
"code": "<string>",
"state": "<string>",
"unsupported": true,
"outcome": "unknown",
"id": "<string>",
"request_key": "<string>",
"cleanup_complete": true,
"balance_cents": 123,
"session": "<string>",
"session_limit": 123,
"active_session_count": 123,
"available_session_slots": 123
}{
"error": "<string>",
"code": "<string>",
"state": "<string>",
"unsupported": true,
"outcome": "unknown",
"id": "<string>",
"request_key": "<string>",
"cleanup_complete": true,
"balance_cents": 123,
"session": "<string>",
"session_limit": 123,
"active_session_count": 123,
"available_session_slots": 123
}{
"error": "<string>",
"code": "<string>",
"state": "<string>",
"unsupported": true,
"outcome": "unknown",
"id": "<string>",
"request_key": "<string>",
"cleanup_complete": true,
"balance_cents": 123,
"session": "<string>",
"session_limit": 123,
"active_session_count": 123,
"available_session_slots": 123
}Authorizations
Phone Harness account API key (pck_…). The dashboard may use a Clerk session JWT with the same header. Never put an account key in a URL.
Path Parameters
Session ID returned by POST /sessions.
Response
Session metadata.
Opaque session ID.
provisioning, ready, error, closing Provider selected for this session.
Display label; not a device connection address.
Time closure was requested. Unix time in seconds.
complete, allocation_uncertain, pending, null metered, disabled Legacy saved-phone ID. Null for a new disposable session.
Sensitive read-only snapshot link. Not the interactive owner viewer.
Show child attributes
Show child attributes
Rounded seconds since creation.
Rounded seconds since readiness, stopped at closure; zero before readiness.
Rounded seconds since the last activity recorded by the API. Does not extend or replace a selected session deadline.
The profile id this session holds, or null for a temporary phone.
Only while state is provisioning: where the phone is. queued means every boot slot is busy and the phone starts as soon as one frees; booting means the phone is starting. eta_seconds is a typical remaining time from recent boots on this worker, not a promise.
Show child attributes
Show child attributes
Public startup failure, if present.
Absolute session expiry, including provisioning. Unix time in seconds.
Selected finite duration from creation, in seconds.
x >= 1Optional startup provenance. Presence is not a latency measurement or a guarantee that prepared starts are available.
Show child attributes
Show child attributes
Returned in a creation response when an idempotency key was supplied.
Present once the session is ready and ADB is enabled.
Show child attributes
Show child attributes