---
title: "List all Relay Sessions"
method: GET
path: "/v1/relays/sessions"
tags: ["Relays"]
---

# List all Relay Sessions

`GET /v1/relays/sessions`

## Request

- Base URL: `https://api.edgegap.com`
- URL: `https://api.edgegap.com/v1/relays/sessions`
- Auth: API key in header `authorization`

List all the active relay sessions.

## Response `200`

Success

- RelaySessionListResponse
  - `sessions` RelaySessionBaseResponse[]: List of relay sessions
    - `session_id` string, required: The session ID
    - `authorization_token` integer: The authorization token for the session
    - `status` string, required: The status of the session
    - `ready` boolean, required: If the session is ready to be used
    - `linked` boolean, required: If the session is linked to a relay
    - `error` string: The error message if the session failed
    - `session_users` RelaySessionUserResponse[]: List Session Users
      - `ip_address` string: The IP Address of the user
      - `latitude` number: The latitude of the user
      - `longitude` number: The longitude of the user
      - `authorization_token` integer: The authorization token of the user
    - `relay` RelayResponse
      - `ip` string: The IP Address of the relay
      - `host` string: The host of the relay
      - `ports` MappedPortResponse
        - `server` ServerRelayPort
          - `port` integer: The port number
          - `protocol` string: The protocol of the port
          - `link` string: The link to the port
        - `client` ClientRelayPort
          - `port` integer: The port number
          - `protocol` string: The protocol of the port
          - `link` string: The link to the port
    - `webhook_url` string: The webhook URL that we will call once the session is ready
  - `pagination` Pagination
    - `number` integer: Current page number
    - `next_page_number` integer: Next page number
    - `previous_page_number` integer: Previous page number
    - `paginator` Paginator
      - `num_pages` integer: Total pages count
    - `has_next` boolean: If there is a next page
    - `has_previous` boolean: If there is a previous page

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `500`: Internal Server Error

---

[API](https://skmtc.dev/edgegap/apis/edgegap-v1.md) · [All operations](https://skmtc.dev/edgegap/apis/edgegap-v1/llms.txt) · [OpenAPI document](https://skmtc.dev/edgegap/apis/edgegap-v1/revisions/9fa2b393a6be?raw)
