> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.airtop.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.airtop.ai/_mcp/server.

# Get info for a session

GET https://api.airtop.ai/api/v1/sessions/{id}

Get a session by ID

Reference: https://docs.airtop.ai/api-reference/airtop-api/sessions/get-info

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `id` (string, required) — Id of the session to get

## Response

### 200

OK

- `data` (ExternalSessionWithConnectionInfo, required)
- `meta` (EnvelopeDefaultMeta, required)
- `errors` (list of Issue, optional)
- `warnings` (list of Issue, optional)

## Errors

### 404 Sessions Get Info Request Not Found Error

Not Found

- `detail` (string, optional) — A human-readable explanation specific to this occurrence of the problem.
- `errors` (list of ErrorDetail, optional) — Optional list of individual error details
- `instance` (string, optional) — A URI reference that identifies the specific occurrence of the problem.
- `status` (long, optional) — HTTP status code
- `title` (string, optional) — A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
- `type` (string, optional, default: about:blank) — A URI reference to human-readable documentation for the error.

### 422 Sessions Get Info Request Unprocessable Entity Error

Unprocessable Entity

- `detail` (string, optional) — A human-readable explanation specific to this occurrence of the problem.
- `errors` (list of ErrorDetail, optional) — Optional list of individual error details
- `instance` (string, optional) — A URI reference that identifies the specific occurrence of the problem.
- `status` (long, optional) — HTTP status code
- `title` (string, optional) — A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
- `type` (string, optional, default: about:blank) — A URI reference to human-readable documentation for the error.

### 500 Sessions Get Info Request Internal Server Error

Internal Server Error

- `detail` (string, optional) — A human-readable explanation specific to this occurrence of the problem.
- `errors` (list of ErrorDetail, optional) — Optional list of individual error details
- `instance` (string, optional) — A URI reference that identifies the specific occurrence of the problem.
- `status` (long, optional) — HTTP status code
- `title` (string, optional) — A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
- `type` (string, optional, default: about:blank) — A URI reference to human-readable documentation for the error.

## Types

### ExternalSessionWithConnectionInfo

- `configuration` (ExternalSessionConfig, required) — Session configuration details. DEPRECATED
- `id` (string, required) — Id of the session.
- `status` (string, required) — Session status.
- `cdpUrl` (string, optional) — Url to connect to chrome devtools protocol port on the Airtop browser. Include the header 'Authorization: Bearer \<api-key>.'
- `cdpWsUrl` (string, optional) — Websocket url to connect to the Airtop browser for CDP-based automation frameworks (e.g. Puppeteer or Playwright). Include the header 'Authorization: Bearer \<airtop-api-key>.'
- `chromedriverUrl` (string, optional) — Websocket url to connect to the Airtop browser for webdriver-based automation frameworks (e.g. Selenium). Include the header 'Authorization: Bearer \<airtop-api-key>.'
- `currentUsage` (long, optional) — Current usage in minutes.
- `dateCreated` (datetime, optional) — Date the session was created.
- `lastActivity` (datetime, optional) — Date of the last activity.
- `viceUrl` (string, optional) — -
- `profileId` (string, optional, deprecated) — Id of a newly persisted profile. DEPRECATED: Use profileName.

### EnvelopeDefaultMeta

- `requestId` (string, optional)

### Issue

- `message` (string, required) — Message describing the issue.
- `code` (string, optional) — Issue code.
- `details` (map from string to any, optional) — Any associated details.
- `reason` (string, optional) — Underlying reason for the issue.

### ErrorDetail

- `location` (string, optional) — Where the error occurred, e.g. 'body.items[3].tags' or 'path.thing-id'
- `message` (string, optional) — Error message text
- `value` (any, optional)

### ExternalSessionConfig

- `baseProfileId` (string, optional) — Id of a profile to load into the session.
- `persistProfile` (boolean, optional) — Persist the profile.
- `timeoutMinutes` (integer, optional, default: 10) — Max length of session in minutes, after which it will terminate if not already deleted.

## Examples

**Response**

```json
{
  "data": {
    "configuration": {
      "baseProfileId": "a13c6f73-bd89-4a76-ab32-5a6c422e8224",
      "persistProfile": true,
      "timeoutMinutes": 10
    },
    "id": "6aac6f73-bd89-4a76-ab32-5a6c422e8b0b",
    "status": "active",
    "cdpUrl": "cdpUrl",
    "cdpWsUrl": "cdpWsUrl",
    "chromedriverUrl": "chromedriverUrl",
    "currentUsage": 1000000,
    "dateCreated": "2024-01-15T09:30:00Z",
    "lastActivity": "2024-01-15T09:30:00Z",
    "viceUrl": "viceUrl",
    "profileId": "427c6f73-bd89-4a76-ab32-5a6c422e8b0b"
  },
  "meta": {
    "requestId": "requestId"
  },
  "errors": [
    {
      "message": "message",
      "code": "code",
      "details": {
        "key": "value"
      },
      "reason": "reason"
    }
  ],
  "warnings": [
    {
      "message": "message",
      "code": "code",
      "details": {
        "key": "value"
      },
      "reason": "reason"
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://api.airtop.ai/api/v1/sessions/6aac6f73-bd89-4a76-ab32-5a6c422e8b0b"

headers = {"Authorization": "Bearer <apiKey>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```typescript
import { AirtopClient } from "@airtop/sdk";

const client = new AirtopClient({ apiKey: "YOUR_API_KEY" });
await client.sessions.getInfo("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b");

```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.airtop.ai/api/v1/sessions/6aac6f73-bd89-4a76-ab32-5a6c422e8b0b"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.airtop.ai/api/v1/sessions/6aac6f73-bd89-4a76-ab32-5a6c422e8b0b")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <apiKey>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.airtop.ai/api/v1/sessions/6aac6f73-bd89-4a76-ab32-5a6c422e8b0b")
  .header("Authorization", "Bearer <apiKey>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.airtop.ai/api/v1/sessions/6aac6f73-bd89-4a76-ab32-5a6c422e8b0b', [
  'headers' => [
    'Authorization' => 'Bearer <apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.airtop.ai/api/v1/sessions/6aac6f73-bd89-4a76-ab32-5a6c422e8b0b");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.airtop.ai/api/v1/sessions/6aac6f73-bd89-4a76-ab32-5a6c422e8b0b")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```