Get the signed-in user
curl --request GET \
--url https://api.hq.zone/v1/api/me \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.hq.zone/v1/api/me"
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/api/me', 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/api/me",
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/api/me"
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/api/me")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hq.zone/v1/api/me")
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_body{
"counts": {
"schedules_owned": 123
},
"identity": {
"default_locale": "<string>",
"discovered_at": "2023-11-07T05:31:56Z",
"external_user_id": "<string>",
"is_admin": true,
"is_bot": true,
"profile_consent": "<string>",
"profile_editable": true,
"slack_connected": true,
"source_kind": "<string>",
"teams_connected": true,
"tenant_slug": "<string>",
"time_format": "<string>",
"time_zone": "<string>",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"avatar_url": "<string>",
"display_name": "<string>",
"email": "<string>",
"last_seen_at": "2023-11-07T05:31:56Z",
"locale": "<string>",
"real_name": "<string>",
"source_workspace": "<string>",
"title": "<string>",
"tz": "<string>"
},
"is_operator": true,
"onboarding": {
"track": "<string>",
"unread_notifications": 123,
"business_domain": "<string>",
"completed_at": "2023-11-07T05:31:56Z",
"domain_confirmed_at": "2023-11-07T05:31:56Z"
},
"out_of_credits": true,
"persona": {
"generated_at": "2023-11-07T05:31:56Z",
"message_count": 123,
"profile": "<unknown>",
"prompt_version": 123,
"last_message_at": "2023-11-07T05:31:56Z",
"model": "<string>"
}
}Me
Get the signed-in user
The caller’s own self-view, scoped to their identity: an identity block
(display name, email, locale, timezone, admin/bot flags, connected-workspace
source, profile-consent state, and clock/timezone display preferences), an
optional persona block summarizing the user’s distilled profile (null if
not yet generated), quick counts such as the number of schedules owned, the
workspace onboarding state, and an out_of_credits flag indicating whether
the workspace has run out of credits.
GET
/
v1
/
api
/
me
Get the signed-in user
curl --request GET \
--url https://api.hq.zone/v1/api/me \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.hq.zone/v1/api/me"
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/api/me', 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/api/me",
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/api/me"
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/api/me")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hq.zone/v1/api/me")
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_body{
"counts": {
"schedules_owned": 123
},
"identity": {
"default_locale": "<string>",
"discovered_at": "2023-11-07T05:31:56Z",
"external_user_id": "<string>",
"is_admin": true,
"is_bot": true,
"profile_consent": "<string>",
"profile_editable": true,
"slack_connected": true,
"source_kind": "<string>",
"teams_connected": true,
"tenant_slug": "<string>",
"time_format": "<string>",
"time_zone": "<string>",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"avatar_url": "<string>",
"display_name": "<string>",
"email": "<string>",
"last_seen_at": "2023-11-07T05:31:56Z",
"locale": "<string>",
"real_name": "<string>",
"source_workspace": "<string>",
"title": "<string>",
"tz": "<string>"
},
"is_operator": true,
"onboarding": {
"track": "<string>",
"unread_notifications": 123,
"business_domain": "<string>",
"completed_at": "2023-11-07T05:31:56Z",
"domain_confirmed_at": "2023-11-07T05:31:56Z"
},
"out_of_credits": true,
"persona": {
"generated_at": "2023-11-07T05:31:56Z",
"message_count": 123,
"profile": "<unknown>",
"prompt_version": 123,
"last_message_at": "2023-11-07T05:31:56Z",
"model": "<string>"
}
}Authorizations
bearer_patoauth2
Response
200 - application/json
The signed-in user's self-view