Resolve Platform User
curl --request POST \
--url https://api.hitler.app/api/users/resolve-platform \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"platform": "<string>",
"platformUserId": "<string>",
"platformTeamId": "<string>"
}
'import requests
url = "https://api.hitler.app/api/users/resolve-platform"
payload = {
"platform": "<string>",
"platformUserId": "<string>",
"platformTeamId": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({platform: '<string>', platformUserId: '<string>', platformTeamId: '<string>'})
};
fetch('https://api.hitler.app/api/users/resolve-platform', 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.hitler.app/api/users/resolve-platform",
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([
'platform' => '<string>',
'platformUserId' => '<string>',
'platformTeamId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.hitler.app/api/users/resolve-platform"
payload := strings.NewReader("{\n \"platform\": \"<string>\",\n \"platformUserId\": \"<string>\",\n \"platformTeamId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://api.hitler.app/api/users/resolve-platform")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"platform\": \"<string>\",\n \"platformUserId\": \"<string>\",\n \"platformTeamId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hitler.app/api/users/resolve-platform")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"platform\": \"<string>\",\n \"platformUserId\": \"<string>\",\n \"platformTeamId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"userId": "<string>",
"organizationId": "<string>",
"email": "<string>",
"name": "<string>",
"role": "<string>",
"token": "<string>"
}Users
Resolve Platform User
Resolve a platform user to an Hitler user (service-to-service)
POST
/
api
/
users
/
resolve-platform
Resolve Platform User
curl --request POST \
--url https://api.hitler.app/api/users/resolve-platform \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"platform": "<string>",
"platformUserId": "<string>",
"platformTeamId": "<string>"
}
'import requests
url = "https://api.hitler.app/api/users/resolve-platform"
payload = {
"platform": "<string>",
"platformUserId": "<string>",
"platformTeamId": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({platform: '<string>', platformUserId: '<string>', platformTeamId: '<string>'})
};
fetch('https://api.hitler.app/api/users/resolve-platform', 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.hitler.app/api/users/resolve-platform",
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([
'platform' => '<string>',
'platformUserId' => '<string>',
'platformTeamId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.hitler.app/api/users/resolve-platform"
payload := strings.NewReader("{\n \"platform\": \"<string>\",\n \"platformUserId\": \"<string>\",\n \"platformTeamId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://api.hitler.app/api/users/resolve-platform")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"platform\": \"<string>\",\n \"platformUserId\": \"<string>\",\n \"platformTeamId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hitler.app/api/users/resolve-platform")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"platform\": \"<string>\",\n \"platformUserId\": \"<string>\",\n \"platformTeamId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"userId": "<string>",
"organizationId": "<string>",
"email": "<string>",
"name": "<string>",
"role": "<string>",
"token": "<string>"
}Overview
Resolves a platform user (Slack, Teams, WhatsApp) to an Hitler user and returns user information along with a short-lived JWT token for authenticated requests.This endpoint is for service-to-service communication only. It requires an API key and should
never be called from client applications.
Authentication
This endpoint uses API key authentication.X-API-Key: your-api-key
Request Body
string
required
The platform identifier. One of:
slack, teams, whatsappstring
required
The user’s ID on the platform (e.g., Slack user ID like
U0123456789)string
The team/workspace ID on the platform (e.g., Slack workspace ID)
Response
string
The Hitler user ID (UUID)
string
The organization ID (UUID)
string
The user’s email address
string
The user’s display name
string
The user’s role:
employee, manager, or adminstring
A short-lived JWT token (15 minutes) for making authenticated requests on behalf of the user
Example
curl -X POST https://api.hitler.io/api/users/resolve-platform \
-H "Content-Type: application/json" \
-H "X-API-Key: your-api-key" \
-d '{
"platform": "slack",
"platformUserId": "U0123456789",
"platformTeamId": "T0123456789"
}'
const client = new HitlerClient({
baseUrl: "https://api.hitler.io",
apiKey: "your-api-key",
});
const resolved = await client.resolveUser({
platform: "slack",
platformUserId: "U0123456789",
platformTeamId: "T0123456789",
});
if (resolved) {
console.log(`User: ${resolved.name}`);
client.setUserToken(resolved.token);
// Now make authenticated requests on behalf of the user
}
Success Response
{
"userId": "550e8400-e29b-41d4-a716-446655440000",
"organizationId": "660e8400-e29b-41d4-a716-446655440001",
"email": "john@company.com",
"name": "John Smith",
"role": "employee",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
User Not Found
If the platform identity is not linked to any user, the endpoint returnsnull with a 200 status code.
null
Usage Notes
Token Lifecycle
The returned token has a 15-minute expiration. Bot services should:- Cache the token with its expiry time
- Re-resolve the user when the token expires
- Use the token for all API calls on behalf of the user
Security Considerations
- Never expose the API key to clients
- The returned token should only be used server-side
- Consider implementing additional rate limiting for this endpoint
- Monitor for unusual resolution patterns that could indicate abuse
Platform Identity Linking
Users must have their platform identity linked before they can be resolved. This is done through:- OAuth flow (automatic linking during Slack/Teams login)
- Admin portal (manual linking by organization admins)
- API call to
POST /api/users/:id/identities