Get user by ID
curl --request GET \
--url https://{subdomain}.nudj.cx/api/v2/admin/users/{id} \
--header 'x-api-token: <api-key>'import requests
url = "https://{subdomain}.nudj.cx/api/v2/admin/users/{id}"
headers = {"x-api-token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-token': '<api-key>'}};
fetch('https://{subdomain}.nudj.cx/api/v2/admin/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://{subdomain}.nudj.cx/api/v2/admin/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 => [
"x-api-token: <api-key>"
],
]);
$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://{subdomain}.nudj.cx/api/v2/admin/users/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{subdomain}.nudj.cx/api/v2/admin/users/{id}")
.header("x-api-token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.nudj.cx/api/v2/admin/users/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"username": "<string>",
"points": 123,
"keys": 123,
"xp": {
"total": 1,
"knowledge": 1,
"creativity": 1,
"loyalty": 1,
"influence": 1,
"participation": 1,
"contribution": 1
},
"communityData": [
{
"communityId": "<string>",
"streak": {
"currentStreak": 1,
"lastExtendedAt": "<string>",
"longestStreak": 1
},
"challengesCompleted": 1,
"achievementsCompleted": 1,
"points": 123,
"xp": {
"total": 1,
"knowledge": 1,
"creativity": 1,
"loyalty": 1,
"influence": 1,
"participation": 1,
"contribution": 1
},
"hasAcceptedRules": true
}
],
"createdAt": "<string>",
"roles": [
"<string>"
],
"email": "<string>",
"isAnonymous": true,
"updatedAt": "<string>",
"organisationId": "<string>",
"displayName": "<string>",
"bio": "<string>",
"profilePictureUrl": "<string>",
"emailVerified": "<string>",
"locale": "<string>",
"socialHandles": {
"instagram": "<string>",
"loyaltyCardNumber": "<string>",
"tiktok": "<string>"
},
"fullName": "John Doe",
"parentEmail": "<string>",
"birthDay": 123,
"birthMonth": 123,
"birthYear": 123,
"externalUserId": "<string>"
}{
"code": "BAD_REQUEST",
"message": "Invalid input data",
"issues": []
}{
"code": "NOT_FOUND",
"message": "Not found",
"issues": []
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}User
Get user by ID
Retrieve a user by their ID.
GET
/
users
/
{id}
Get user by ID
curl --request GET \
--url https://{subdomain}.nudj.cx/api/v2/admin/users/{id} \
--header 'x-api-token: <api-key>'import requests
url = "https://{subdomain}.nudj.cx/api/v2/admin/users/{id}"
headers = {"x-api-token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-token': '<api-key>'}};
fetch('https://{subdomain}.nudj.cx/api/v2/admin/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://{subdomain}.nudj.cx/api/v2/admin/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 => [
"x-api-token: <api-key>"
],
]);
$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://{subdomain}.nudj.cx/api/v2/admin/users/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{subdomain}.nudj.cx/api/v2/admin/users/{id}")
.header("x-api-token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.nudj.cx/api/v2/admin/users/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"username": "<string>",
"points": 123,
"keys": 123,
"xp": {
"total": 1,
"knowledge": 1,
"creativity": 1,
"loyalty": 1,
"influence": 1,
"participation": 1,
"contribution": 1
},
"communityData": [
{
"communityId": "<string>",
"streak": {
"currentStreak": 1,
"lastExtendedAt": "<string>",
"longestStreak": 1
},
"challengesCompleted": 1,
"achievementsCompleted": 1,
"points": 123,
"xp": {
"total": 1,
"knowledge": 1,
"creativity": 1,
"loyalty": 1,
"influence": 1,
"participation": 1,
"contribution": 1
},
"hasAcceptedRules": true
}
],
"createdAt": "<string>",
"roles": [
"<string>"
],
"email": "<string>",
"isAnonymous": true,
"updatedAt": "<string>",
"organisationId": "<string>",
"displayName": "<string>",
"bio": "<string>",
"profilePictureUrl": "<string>",
"emailVerified": "<string>",
"locale": "<string>",
"socialHandles": {
"instagram": "<string>",
"loyaltyCardNumber": "<string>",
"tiktok": "<string>"
},
"fullName": "John Doe",
"parentEmail": "<string>",
"birthDay": 123,
"birthMonth": 123,
"birthYear": 123,
"externalUserId": "<string>"
}{
"code": "BAD_REQUEST",
"message": "Invalid input data",
"issues": []
}{
"code": "NOT_FOUND",
"message": "Not found",
"issues": []
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}Authorizations
Path Parameters
The ID of the user to get. This can be the internal ID or the external ID.
Response
Successful response
A user
User XP Breakdown
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Social media handles and loyalty information for a user
Show child attributes
Show child attributes
Example:
"John Doe"
Was this page helpful?
⌘I

