Get a list of users
curl --request GET \
--url https://{tenant_id}.hanko.io/admin/users \
--header 'Authorization: Bearer <token>'import requests
url = "https://{tenant_id}.hanko.io/admin/users"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{tenant_id}.hanko.io/admin/users', 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://{tenant_id}.hanko.io/admin/users",
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://{tenant_id}.hanko.io/admin/users"
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://{tenant_id}.hanko.io/admin/users")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant_id}.hanko.io/admin/users")
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[
{
"id": "c339547d-e17d-4ba7-8a1d-b3d5a4d17c1c",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"webauthn_credentials": [
{
"id": "f9bebc04-b894-4018-bdb8-8b520a532fef",
"public_key": "<string>",
"attestation_type": "<string>",
"aaguid": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"backup_eligible": true,
"backup_state": true,
"mfa_only": true,
"name": "<string>",
"transports": [
"<string>"
],
"last_used_at": "2023-11-07T05:31:56Z"
}
],
"emails": [
{
"id": "802df042-1ac2-496d-af81-6ace729ed055",
"address": "jsmith@example.com",
"is_verified": true,
"is_primary": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"username": {
"id": "8cbed467-554b-4d17-b23f-bce1b4f1db92",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"username": "john_doe_123"
},
"name": "John Doe",
"given_name": "John",
"family_name": "Doe",
"picture": "https://example.com/avatar.jpg",
"organizations": [
{
"id": "c339547d-e17d-4ba7-8a1d-b3d5a4d17c1c",
"name": "<string>",
"roles": [
{
"id": "c339547d-e17d-4ba7-8a1d-b3d5a4d17c1c",
"slug": "<string>",
"name": "<string>"
}
]
}
]
}
]{
"code": 400,
"message": "Bad Request"
}{
"code": 500,
"message": "Internal Server Error"
}User Management
Get a list of users
GET
/
users
Get a list of users
curl --request GET \
--url https://{tenant_id}.hanko.io/admin/users \
--header 'Authorization: Bearer <token>'import requests
url = "https://{tenant_id}.hanko.io/admin/users"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{tenant_id}.hanko.io/admin/users', 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://{tenant_id}.hanko.io/admin/users",
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://{tenant_id}.hanko.io/admin/users"
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://{tenant_id}.hanko.io/admin/users")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant_id}.hanko.io/admin/users")
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[
{
"id": "c339547d-e17d-4ba7-8a1d-b3d5a4d17c1c",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"webauthn_credentials": [
{
"id": "f9bebc04-b894-4018-bdb8-8b520a532fef",
"public_key": "<string>",
"attestation_type": "<string>",
"aaguid": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"backup_eligible": true,
"backup_state": true,
"mfa_only": true,
"name": "<string>",
"transports": [
"<string>"
],
"last_used_at": "2023-11-07T05:31:56Z"
}
],
"emails": [
{
"id": "802df042-1ac2-496d-af81-6ace729ed055",
"address": "jsmith@example.com",
"is_verified": true,
"is_primary": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"username": {
"id": "8cbed467-554b-4d17-b23f-bce1b4f1db92",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"username": "john_doe_123"
},
"name": "John Doe",
"given_name": "John",
"family_name": "Doe",
"picture": "https://example.com/avatar.jpg",
"organizations": [
{
"id": "c339547d-e17d-4ba7-8a1d-b3d5a4d17c1c",
"name": "<string>",
"roles": [
{
"id": "c339547d-e17d-4ba7-8a1d-b3d5a4d17c1c",
"slug": "<string>",
"name": "<string>"
}
]
}
]
}
]{
"code": 400,
"message": "Bad Request"
}{
"code": 500,
"message": "Internal Server Error"
}Authorizations
Query Parameters
Response
Details about users