curl --request POST \
--url https://edge.sterndesk.com/rpc/rpc.v1.RootService/WhoAmI \
--header 'Authorization: Bearer <token>' \
--header 'Connect-Protocol-Version: <connect-protocol-version>' \
--header 'Content-Type: application/json' \
--data '
{
"echo": "<string>"
}
'import requests
url = "https://edge.sterndesk.com/rpc/rpc.v1.RootService/WhoAmI"
payload = { "echo": "<string>" }
headers = {
"Connect-Protocol-Version": "<connect-protocol-version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Connect-Protocol-Version': '<connect-protocol-version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({echo: '<string>'})
};
fetch('https://edge.sterndesk.com/rpc/rpc.v1.RootService/WhoAmI', 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://edge.sterndesk.com/rpc/rpc.v1.RootService/WhoAmI",
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([
'echo' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Connect-Protocol-Version: <connect-protocol-version>",
"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://edge.sterndesk.com/rpc/rpc.v1.RootService/WhoAmI"
payload := strings.NewReader("{\n \"echo\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Connect-Protocol-Version", "<connect-protocol-version>")
req.Header.Add("Authorization", "Bearer <token>")
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://edge.sterndesk.com/rpc/rpc.v1.RootService/WhoAmI")
.header("Connect-Protocol-Version", "<connect-protocol-version>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"echo\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://edge.sterndesk.com/rpc/rpc.v1.RootService/WhoAmI")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Connect-Protocol-Version"] = '<connect-protocol-version>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"echo\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"primaryEmail": "<string>",
"emailVerified": true,
"givenName": "<string>",
"familyName": "<string>",
"backendVersion": "<string>",
"impersonatorEmail": "<string>",
"organizationId": "<string>",
"organizationName": "<string>",
"organizationRole": "<string>",
"organizationIsSetupBasic": true,
"organization": {
"id": "<string>",
"name": "<string>",
"role": "<string>",
"isSetupBasic": true,
"slug": "<string>"
},
"isSetupBasic": true,
"primaryPhoneE164": "<string>",
"secondaryPhoneE164": "<string>",
"preferences": {
"notShowGettingStarted": true
},
"echo": "<string>"
}{
"code": "not_found",
"message": "<string>",
"details": [
{
"type": "<string>",
"value": "<string>",
"debug": {}
}
]
}WhoAmI
WhoAmI returns information about the current authenticated user.
curl --request POST \
--url https://edge.sterndesk.com/rpc/rpc.v1.RootService/WhoAmI \
--header 'Authorization: Bearer <token>' \
--header 'Connect-Protocol-Version: <connect-protocol-version>' \
--header 'Content-Type: application/json' \
--data '
{
"echo": "<string>"
}
'import requests
url = "https://edge.sterndesk.com/rpc/rpc.v1.RootService/WhoAmI"
payload = { "echo": "<string>" }
headers = {
"Connect-Protocol-Version": "<connect-protocol-version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Connect-Protocol-Version': '<connect-protocol-version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({echo: '<string>'})
};
fetch('https://edge.sterndesk.com/rpc/rpc.v1.RootService/WhoAmI', 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://edge.sterndesk.com/rpc/rpc.v1.RootService/WhoAmI",
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([
'echo' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Connect-Protocol-Version: <connect-protocol-version>",
"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://edge.sterndesk.com/rpc/rpc.v1.RootService/WhoAmI"
payload := strings.NewReader("{\n \"echo\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Connect-Protocol-Version", "<connect-protocol-version>")
req.Header.Add("Authorization", "Bearer <token>")
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://edge.sterndesk.com/rpc/rpc.v1.RootService/WhoAmI")
.header("Connect-Protocol-Version", "<connect-protocol-version>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"echo\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://edge.sterndesk.com/rpc/rpc.v1.RootService/WhoAmI")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Connect-Protocol-Version"] = '<connect-protocol-version>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"echo\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"primaryEmail": "<string>",
"emailVerified": true,
"givenName": "<string>",
"familyName": "<string>",
"backendVersion": "<string>",
"impersonatorEmail": "<string>",
"organizationId": "<string>",
"organizationName": "<string>",
"organizationRole": "<string>",
"organizationIsSetupBasic": true,
"organization": {
"id": "<string>",
"name": "<string>",
"role": "<string>",
"isSetupBasic": true,
"slug": "<string>"
},
"isSetupBasic": true,
"primaryPhoneE164": "<string>",
"secondaryPhoneE164": "<string>",
"preferences": {
"notShowGettingStarted": true
},
"echo": "<string>"
}{
"code": "not_found",
"message": "<string>",
"details": [
{
"type": "<string>",
"value": "<string>",
"debug": {}
}
]
}Authorizations
Personal API key, sent as Authorization: Bearer <key>.
Headers
Define the version of the Connect protocol
1
Define the timeout, in ms
1000
Body
request for information about the current authenticated user
a message that will be returned to the user for debugging and development
1 - 128Response
Success
response with information about the current authenticated user
user id of the current authenticated user
email of the currently logged-in user
if an email has been verified
given name of the currently logged-in user (if any)
family name of the currently logged-in user (if any)
version of the backend, handy for debugging
if the current user is impersonating someone, the impersonator's email is set here.
id of the organization the user is a member of (if any)
name of the organization the user is a member of (if any)
role of the user in the organization (if any)
whether the user's organization has been set up with the basic configuration.
info of the active organization. This replaces the separate fields above.
Show child attributes
Show child attributes
if the user has been setup with basic information
primary phone nr in e164 format
secondary phone nr in e164 format
user's preferences
Show child attributes
Show child attributes
the input echo returned to the user for debugging and development