Identify
curl --request GET \
--url https://api.attio.com/v2/self \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.attio.com/v2/self"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.attio.com/v2/self', 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.attio.com/v2/self",
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.attio.com/v2/self"
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.attio.com/v2/self")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.attio.com/v2/self")
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{
"active": true,
"scope": "object_configuration:read-write record_permission:read-write",
"client_id": "3b9d6c14-72af-4e08-8d5b-0a7f2e91c463",
"token_type": "Bearer",
"exp": null,
"iat": 1672585200,
"sub": "14beef7a-99f7-4534-a87e-70b564330a4c",
"aud": "3b9d6c14-72af-4e08-8d5b-0a7f2e91c463",
"iss": "attio.com",
"authorized_by_workspace_member_id": "50cf242c-7fa3-4cad-87d0-75b1af71c57b",
"workspace_id": "14beef7a-99f7-4534-a87e-70b564330a4c",
"workspace_name": "Salarya",
"workspace_slug": "salarya",
"workspace_logo_url": null
}Meta
Identify
Identify the current access token, the workspace it is linked to, and any permissions it has.
Every kind of Attio access token can be introspected:
- Workspace access tokens, created from a workspace’s settings. These have no OAuth client, so
client_idandaudcontain the workspace access token’s own ID. - OAuth access tokens, granted to an app through the OAuth 2.0 authorization code flow.
client_idandaudcontain the app ID. - App access tokens, issued to an app installation and exposed to that app’s server functions as
ATTIO_API_TOKEN.client_idandaudcontain the app ID.
Per RFC 7662, active is the only member guaranteed to be present. exp is always null, because Attio access tokens do not currently expire.
All other members are optional, and are omitted rather than returned as null when they are not present.
Unknown, revoked, and deleted tokens are not treated as an error. They return 200 with {"active": false} and no other members.
GET
/
v2
/
self
Identify
curl --request GET \
--url https://api.attio.com/v2/self \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.attio.com/v2/self"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.attio.com/v2/self', 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.attio.com/v2/self",
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.attio.com/v2/self"
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.attio.com/v2/self")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.attio.com/v2/self")
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{
"active": true,
"scope": "object_configuration:read-write record_permission:read-write",
"client_id": "3b9d6c14-72af-4e08-8d5b-0a7f2e91c463",
"token_type": "Bearer",
"exp": null,
"iat": 1672585200,
"sub": "14beef7a-99f7-4534-a87e-70b564330a4c",
"aud": "3b9d6c14-72af-4e08-8d5b-0a7f2e91c463",
"iss": "attio.com",
"authorized_by_workspace_member_id": "50cf242c-7fa3-4cad-87d0-75b1af71c57b",
"workspace_id": "14beef7a-99f7-4534-a87e-70b564330a4c",
"workspace_name": "Salarya",
"workspace_slug": "salarya",
"workspace_logo_url": null
}Was this page helpful?