Get a user
curl --request GET \
--url https://galinum.com/api/v1/users/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://galinum.com/api/v1/users/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://galinum.com/api/v1/users/{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://galinum.com/api/v1/users/{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://galinum.com/api/v1/users/{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://galinum.com/api/v1/users/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://galinum.com/api/v1/users/{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{
"user": {
"id": "eu_9b1f2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d",
"externalUserId": "user_123",
"traits": {
"plan": "free",
"$browser": "Chrome"
},
"firstSeenAt": 123,
"lastSeenAt": 123
}
}{
"error": "userId is required"
}{
"error": "Unauthorized"
}{
"error": "<string>"
}{
"error": "Too many requests"
}{
"error": "Could not identify user"
}Users & events
Get a user
Returns one end-user by Galinum id (eu_…) or by your own external user id.
GET
/
api
/
v1
/
users
/
{id}
Get a user
curl --request GET \
--url https://galinum.com/api/v1/users/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://galinum.com/api/v1/users/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://galinum.com/api/v1/users/{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://galinum.com/api/v1/users/{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://galinum.com/api/v1/users/{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://galinum.com/api/v1/users/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://galinum.com/api/v1/users/{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{
"user": {
"id": "eu_9b1f2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d",
"externalUserId": "user_123",
"traits": {
"plan": "free",
"$browser": "Chrome"
},
"firstSeenAt": 123,
"lastSeenAt": 123
}
}{
"error": "userId is required"
}{
"error": "Unauthorized"
}{
"error": "<string>"
}{
"error": "Too many requests"
}{
"error": "Could not identify user"
}Authorizations
secretKeyhostedAgentKey
Your project's secret key (pk_…, without the pub segment). Server-side only — never ship it to a browser. Get it from Settings → Projects in the dashboard.
Path Parameters
A Galinum end-user id or your external user id.
Maximum string length:
256Response
The user.
Show child attributes
Show child attributes