cURL
curl --request GET \
--url https://api.hq.zone/v1/agent-browser/connect \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.hq.zone/v1/agent-browser/connect"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.hq.zone/v1/agent-browser/connect', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hq.zone/v1/agent-browser/connect",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.hq.zone/v1/agent-browser/connect"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.hq.zone/v1/agent-browser/connect")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hq.zone/v1/agent-browser/connect")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyIntegrations
Browser connect
GET
/
v1
/
agent-browser
/
connect
cURL
curl --request GET \
--url https://api.hq.zone/v1/agent-browser/connect \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.hq.zone/v1/agent-browser/connect"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.hq.zone/v1/agent-browser/connect', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hq.zone/v1/agent-browser/connect",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.hq.zone/v1/agent-browser/connect"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.hq.zone/v1/agent-browser/connect")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hq.zone/v1/agent-browser/connect")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyWebSocket endpoint
This is not a plain HTTPGET — it’s a WebSocket upgrade. It’s the channel the HQ browser extension dials out on so a remote agent can drive the user’s local browser; you don’t normally call it yourself.
- Subprotocol:
hq-agent-browser.v1. - Auth: a browser can’t set an
Authorizationheader on a WebSocket, so the PAT rides inSec-WebSocket-Protocolashq-pat.<token>, alongside the subprotocol. - Heartbeat: ~20 s application-level ping (also keeps idle proxies open).
- Presence: one live connection per user. The server relays
computer.*commands down this socket and awaits each result.
GET /v1/agent-browser/connect
Upgrade: websocket
Sec-WebSocket-Protocol: hq-agent-browser.v1, hq-pat.hq_pat_xxx
Authorizations
Personal Access Token. Send as Authorization: Bearer hq_pat_....
Response
101
WebSocket upgrade. The HQ extension dials out here (PAT in Sec-WebSocket-Protocol as hq-pat.<token>) to receive computer.* commands. Frames are the WebDriver-BiDi-shaped local_browser_protocol (see docs/local-browser-control.md); OpenAPI cannot describe the per-frame protocol.