curl --request POST \
--url https://workspace.example.com/v1/integrations/hubspot/connect \
--header 'Origin: <origin>' \
--header 'X-CSRF-Token: <x-csrf-token>' \
--cookie __Host-signal_session=import requests
url = "https://workspace.example.com/v1/integrations/hubspot/connect"
headers = {
"cookie": "__Host-signal_session=",
"Origin": "<origin>",
"X-CSRF-Token": "<x-csrf-token>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
cookie: '__Host-signal_session=',
Origin: '<origin>',
'X-CSRF-Token': '<x-csrf-token>'
}
};
fetch('https://workspace.example.com/v1/integrations/hubspot/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://workspace.example.com/v1/integrations/hubspot/connect",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_COOKIE => "__Host-signal_session=",
CURLOPT_HTTPHEADER => [
"Origin: <origin>",
"X-CSRF-Token: <x-csrf-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://workspace.example.com/v1/integrations/hubspot/connect"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("cookie", "__Host-signal_session=")
req.Header.Add("Origin", "<origin>")
req.Header.Add("X-CSRF-Token", "<x-csrf-token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://workspace.example.com/v1/integrations/hubspot/connect")
.header("cookie", "__Host-signal_session=")
.header("Origin", "<origin>")
.header("X-CSRF-Token", "<x-csrf-token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://workspace.example.com/v1/integrations/hubspot/connect")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = '__Host-signal_session='
request["Origin"] = '<origin>'
request["X-CSRF-Token"] = '<x-csrf-token>'
response = http.request(request)
puts response.read_bodyBegin Connection
Requires an authenticated browser session, matching Origin and X-CSRF-Token. Read csrf_token from GET /v1/me using that session. Omit Authorization: the server prioritizes bearer authentication over cookies, so bearer authentication is rejected here even when a session cookie is also present. Returns the provider authorization URL; complete consent through the workspace browser flow. Provider application setup is a separate prerequisite.
curl --request POST \
--url https://workspace.example.com/v1/integrations/hubspot/connect \
--header 'Origin: <origin>' \
--header 'X-CSRF-Token: <x-csrf-token>' \
--cookie __Host-signal_session=import requests
url = "https://workspace.example.com/v1/integrations/hubspot/connect"
headers = {
"cookie": "__Host-signal_session=",
"Origin": "<origin>",
"X-CSRF-Token": "<x-csrf-token>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
cookie: '__Host-signal_session=',
Origin: '<origin>',
'X-CSRF-Token': '<x-csrf-token>'
}
};
fetch('https://workspace.example.com/v1/integrations/hubspot/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://workspace.example.com/v1/integrations/hubspot/connect",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_COOKIE => "__Host-signal_session=",
CURLOPT_HTTPHEADER => [
"Origin: <origin>",
"X-CSRF-Token: <x-csrf-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://workspace.example.com/v1/integrations/hubspot/connect"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("cookie", "__Host-signal_session=")
req.Header.Add("Origin", "<origin>")
req.Header.Add("X-CSRF-Token", "<x-csrf-token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://workspace.example.com/v1/integrations/hubspot/connect")
.header("cookie", "__Host-signal_session=")
.header("Origin", "<origin>")
.header("X-CSRF-Token", "<x-csrf-token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://workspace.example.com/v1/integrations/hubspot/connect")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = '__Host-signal_session='
request["Origin"] = '<origin>'
request["X-CSRF-Token"] = '<x-csrf-token>'
response = http.request(request)
puts response.read_bodyAuthorizations
Production host-only browser session. Read csrf_token from GET /v1/me using this session; bearer authentication returns a null CSRF token and takes precedence over cookies. Session mutations require exact Origin and X-CSRF-Token. Development uses signal_session.
Headers
Required for this browser-session-only mutation. Origin must exactly match the workspace; read the CSRF token from GET /v1/me using the browser session and omit Authorization. Bearer authentication is rejected by this route.
Required for this browser-session-only mutation. Origin must exactly match the workspace; read the CSRF token from GET /v1/me using the browser session and omit Authorization. Bearer authentication is rejected by this route.
Response
Successful Response