End Users
Get End User Info
Available for: Chatflow, Workflow, Agent, Chatbot, Legacy Agent, Text Generator apps.
Returns an end user’s details by ID. Useful for resolving an end-user ID returned by another endpoint, such as created_by in the Upload File response.
GET
/
end-users
/
{end_user_id}
Get End User Info
curl --request GET \
--url https://{api_base_url}/end-users/{end_user_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://{api_base_url}/end-users/{end_user_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{api_base_url}/end-users/{end_user_id}', 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_base_url}/end-users/{end_user_id}",
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_base_url}/end-users/{end_user_id}"
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_base_url}/end-users/{end_user_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{api_base_url}/end-users/{end_user_id}")
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{
"app_id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
"created_at": "2024-01-16T12:00:29Z",
"external_user_id": "abc-123",
"id": "f1e2d3c4-b5a6-7890-abcd-ef1234567890",
"is_anonymous": false,
"name": null,
"session_id": "abc-123",
"tenant_id": "11223344-5566-7788-99aa-bbccddeeff00",
"type": "service-api",
"updated_at": "2024-01-16T12:00:29Z"
}Authorizations
Every request authenticates with an API key: Authorization: Bearer {API_KEY}. App endpoints take an app API key; knowledge endpoints take a knowledge base API key (Get Started).
Keep keys server-side; never embed them in client code. Requests with a missing or invalid key fail with HTTP 401 (unauthorized).
Response
End user retrieved successfully.
The user identifier provided in API requests (e.g., the user field in Send Chat Message).
Was this page helpful?
⌘I
Get End User Info
curl --request GET \
--url https://{api_base_url}/end-users/{end_user_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://{api_base_url}/end-users/{end_user_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{api_base_url}/end-users/{end_user_id}', 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_base_url}/end-users/{end_user_id}",
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_base_url}/end-users/{end_user_id}"
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_base_url}/end-users/{end_user_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{api_base_url}/end-users/{end_user_id}")
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{
"app_id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
"created_at": "2024-01-16T12:00:29Z",
"external_user_id": "abc-123",
"id": "f1e2d3c4-b5a6-7890-abcd-ef1234567890",
"is_anonymous": false,
"name": null,
"session_id": "abc-123",
"tenant_id": "11223344-5566-7788-99aa-bbccddeeff00",
"type": "service-api",
"updated_at": "2024-01-16T12:00:29Z"
}