Get current user
curl --request GET \
--url https://app.gtm-api.com/id/v4/api/users/current \
--header 'Authorization: Bearer <token>' \
--header 'Team-SID: <api-key>'import requests
url = "https://app.gtm-api.com/id/v4/api/users/current"
headers = {
"Authorization": "Bearer <token>",
"Team-SID": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'Team-SID': '<api-key>'}
};
fetch('https://app.gtm-api.com/id/v4/api/users/current', 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://app.gtm-api.com/id/v4/api/users/current",
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>",
"Team-SID: <api-key>"
],
]);
$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://app.gtm-api.com/id/v4/api/users/current"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Team-SID", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.gtm-api.com/id/v4/api/users/current")
.header("Authorization", "Bearer <token>")
.header("Team-SID", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.gtm-api.com/id/v4/api/users/current")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["Team-SID"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"operation": "get",
"item": {
"sid": "<string>",
"default_team_sid": "<string>",
"email": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"avatar_url": "<string>",
"phone": "<string>",
"timezone": "<string>",
"country": "<string>",
"config": {
"latest_team_sid": "<string>",
"onboarding_completed": true,
"onboarding_steps": [
"<string>"
],
"locale": "<string>"
},
"utm": {},
"created_at": "<string>",
"updated_at": "<string>",
"erasure_requested_at": "<string>",
"erased_at": "<string>",
"deleted_at": "<string>"
},
"included": {},
"includes": [
"<string>"
],
"meta": {
"trace_id": "<string>",
"span_id": "<string>",
"timestamp": "<string>",
"duration_ms": 1,
"debug_url": "<string>"
}
}{
"success": false,
"error": {
"message": "<string>",
"recoverable": true,
"suggestion": "<string>",
"field_errors": {},
"blockers": [
{
"type": "<string>",
"description": "<string>",
"entity_sid": "<string>",
"resolution": "<string>",
"resolution_hint": "<string>",
"count": 123
}
],
"context": {}
},
"meta": {
"trace_id": "<string>",
"span_id": "<string>",
"timestamp": "<string>",
"duration_ms": 1,
"debug_url": "<string>"
}
}{
"success": false,
"error": {
"message": "<string>",
"recoverable": true,
"suggestion": "<string>",
"field_errors": {},
"blockers": [
{
"type": "<string>",
"description": "<string>",
"entity_sid": "<string>",
"resolution": "<string>",
"resolution_hint": "<string>",
"count": 123
}
],
"context": {}
},
"meta": {
"trace_id": "<string>",
"span_id": "<string>",
"timestamp": "<string>",
"duration_ms": 1,
"debug_url": "<string>"
}
}users
Get current user
Return the authenticated user’s own profile: the JWT subject, self only (no form). include[]=default_team hydrates the working team; include[]=accessible_teams returns the owner + active-membership union (workspace switcher / OAuth consent multiselect). Reads email, name, timezone, default_team_sid.
Contract:
- MCP tool
get_current_user, registry packagemcp.id/users, mountid.identity. - Operation
get, response envelopeget. - Flags: read only.
GET
/
api
/
users
/
current
Get current user
curl --request GET \
--url https://app.gtm-api.com/id/v4/api/users/current \
--header 'Authorization: Bearer <token>' \
--header 'Team-SID: <api-key>'import requests
url = "https://app.gtm-api.com/id/v4/api/users/current"
headers = {
"Authorization": "Bearer <token>",
"Team-SID": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'Team-SID': '<api-key>'}
};
fetch('https://app.gtm-api.com/id/v4/api/users/current', 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://app.gtm-api.com/id/v4/api/users/current",
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>",
"Team-SID: <api-key>"
],
]);
$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://app.gtm-api.com/id/v4/api/users/current"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Team-SID", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.gtm-api.com/id/v4/api/users/current")
.header("Authorization", "Bearer <token>")
.header("Team-SID", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.gtm-api.com/id/v4/api/users/current")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["Team-SID"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"operation": "get",
"item": {
"sid": "<string>",
"default_team_sid": "<string>",
"email": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"avatar_url": "<string>",
"phone": "<string>",
"timezone": "<string>",
"country": "<string>",
"config": {
"latest_team_sid": "<string>",
"onboarding_completed": true,
"onboarding_steps": [
"<string>"
],
"locale": "<string>"
},
"utm": {},
"created_at": "<string>",
"updated_at": "<string>",
"erasure_requested_at": "<string>",
"erased_at": "<string>",
"deleted_at": "<string>"
},
"included": {},
"includes": [
"<string>"
],
"meta": {
"trace_id": "<string>",
"span_id": "<string>",
"timestamp": "<string>",
"duration_ms": 1,
"debug_url": "<string>"
}
}{
"success": false,
"error": {
"message": "<string>",
"recoverable": true,
"suggestion": "<string>",
"field_errors": {},
"blockers": [
{
"type": "<string>",
"description": "<string>",
"entity_sid": "<string>",
"resolution": "<string>",
"resolution_hint": "<string>",
"count": 123
}
],
"context": {}
},
"meta": {
"trace_id": "<string>",
"span_id": "<string>",
"timestamp": "<string>",
"duration_ms": 1,
"debug_url": "<string>"
}
}{
"success": false,
"error": {
"message": "<string>",
"recoverable": true,
"suggestion": "<string>",
"field_errors": {},
"blockers": [
{
"type": "<string>",
"description": "<string>",
"entity_sid": "<string>",
"resolution": "<string>",
"resolution_hint": "<string>",
"count": 123
}
],
"context": {}
},
"meta": {
"trace_id": "<string>",
"span_id": "<string>",
"timestamp": "<string>",
"duration_ms": 1,
"debug_url": "<string>"
}
}Authorizations
Access token issued by gtm.service.id. Its access_identity claim carries team_sid, actor_sid and actor_type, and that team scope is authoritative.
Team scope for tokens that do not carry one. Ignored when the token already names a team.
Query Parameters
Relations to eager-load: default_team, accessible_teams.
Available options:
default_team, accessible_teams ⌘I