Start Browser Login
curl --request POST \
--url https://api.mountthor.com/v1/admin/sessions/authorize \
--header 'Content-Type: application/json' \
--data '
{
"cli_verifier_sha256": "<string>",
"localhost_redirect_uri": "http://127.0.0.1:54321/callback",
"localhost_state_sha256": "<string>",
"customer_slug": "acme",
"tenant_slug": "acme-prod"
}
'import requests
url = "https://api.mountthor.com/v1/admin/sessions/authorize"
payload = {
"cli_verifier_sha256": "<string>",
"localhost_redirect_uri": "http://127.0.0.1:54321/callback",
"localhost_state_sha256": "<string>",
"customer_slug": "acme",
"tenant_slug": "acme-prod"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
cli_verifier_sha256: '<string>',
localhost_redirect_uri: 'http://127.0.0.1:54321/callback',
localhost_state_sha256: '<string>',
customer_slug: 'acme',
tenant_slug: 'acme-prod'
})
};
fetch('https://api.mountthor.com/v1/admin/sessions/authorize', 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.mountthor.com/v1/admin/sessions/authorize",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'cli_verifier_sha256' => '<string>',
'localhost_redirect_uri' => 'http://127.0.0.1:54321/callback',
'localhost_state_sha256' => '<string>',
'customer_slug' => 'acme',
'tenant_slug' => 'acme-prod'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mountthor.com/v1/admin/sessions/authorize"
payload := strings.NewReader("{\n \"cli_verifier_sha256\": \"<string>\",\n \"localhost_redirect_uri\": \"http://127.0.0.1:54321/callback\",\n \"localhost_state_sha256\": \"<string>\",\n \"customer_slug\": \"acme\",\n \"tenant_slug\": \"acme-prod\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.mountthor.com/v1/admin/sessions/authorize")
.header("Content-Type", "application/json")
.body("{\n \"cli_verifier_sha256\": \"<string>\",\n \"localhost_redirect_uri\": \"http://127.0.0.1:54321/callback\",\n \"localhost_state_sha256\": \"<string>\",\n \"customer_slug\": \"acme\",\n \"tenant_slug\": \"acme-prod\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mountthor.com/v1/admin/sessions/authorize")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"cli_verifier_sha256\": \"<string>\",\n \"localhost_redirect_uri\": \"http://127.0.0.1:54321/callback\",\n \"localhost_state_sha256\": \"<string>\",\n \"customer_slug\": \"acme\",\n \"tenant_slug\": \"acme-prod\"\n}"
response = http.request(request)
puts response.read_body{
"authorization_url": "https://api.workos.com/sso/authorize?...",
"login_request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"state_expires_in_seconds": 1800
}"<string>"Sessions
Start Browser Login
POST
/
v1
/
admin
/
sessions
/
authorize
Start Browser Login
curl --request POST \
--url https://api.mountthor.com/v1/admin/sessions/authorize \
--header 'Content-Type: application/json' \
--data '
{
"cli_verifier_sha256": "<string>",
"localhost_redirect_uri": "http://127.0.0.1:54321/callback",
"localhost_state_sha256": "<string>",
"customer_slug": "acme",
"tenant_slug": "acme-prod"
}
'import requests
url = "https://api.mountthor.com/v1/admin/sessions/authorize"
payload = {
"cli_verifier_sha256": "<string>",
"localhost_redirect_uri": "http://127.0.0.1:54321/callback",
"localhost_state_sha256": "<string>",
"customer_slug": "acme",
"tenant_slug": "acme-prod"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
cli_verifier_sha256: '<string>',
localhost_redirect_uri: 'http://127.0.0.1:54321/callback',
localhost_state_sha256: '<string>',
customer_slug: 'acme',
tenant_slug: 'acme-prod'
})
};
fetch('https://api.mountthor.com/v1/admin/sessions/authorize', 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.mountthor.com/v1/admin/sessions/authorize",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'cli_verifier_sha256' => '<string>',
'localhost_redirect_uri' => 'http://127.0.0.1:54321/callback',
'localhost_state_sha256' => '<string>',
'customer_slug' => 'acme',
'tenant_slug' => 'acme-prod'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mountthor.com/v1/admin/sessions/authorize"
payload := strings.NewReader("{\n \"cli_verifier_sha256\": \"<string>\",\n \"localhost_redirect_uri\": \"http://127.0.0.1:54321/callback\",\n \"localhost_state_sha256\": \"<string>\",\n \"customer_slug\": \"acme\",\n \"tenant_slug\": \"acme-prod\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.mountthor.com/v1/admin/sessions/authorize")
.header("Content-Type", "application/json")
.body("{\n \"cli_verifier_sha256\": \"<string>\",\n \"localhost_redirect_uri\": \"http://127.0.0.1:54321/callback\",\n \"localhost_state_sha256\": \"<string>\",\n \"customer_slug\": \"acme\",\n \"tenant_slug\": \"acme-prod\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mountthor.com/v1/admin/sessions/authorize")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"cli_verifier_sha256\": \"<string>\",\n \"localhost_redirect_uri\": \"http://127.0.0.1:54321/callback\",\n \"localhost_state_sha256\": \"<string>\",\n \"customer_slug\": \"acme\",\n \"tenant_slug\": \"acme-prod\"\n}"
response = http.request(request)
puts response.read_body{
"authorization_url": "https://api.workos.com/sso/authorize?...",
"login_request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"state_expires_in_seconds": 1800
}"<string>"Body
application/json
SHA-256 hex digest of the CLI's verifier random value.
CLI's localhost callback URI. Must match
http://127.0.0.1:<port>/callback with a non-privileged port and no
query, fragment, or credentials.
Example:
"http://127.0.0.1:54321/callback"
SHA-256 hex digest of the CLI's localhost-state random value.
Example:
"acme"
Optional tenant slug to scope the eventual session to a specific tenant. When omitted the human session is account-scoped.
Only valid alongside customer_slug — the no-slug consumer flow
cannot pre-bind a tenant because the customer is unresolved
until callback. The resolved session in the consumer flow is
always account-scoped.
Example:
"acme-prod"
Response
SSO authorization started