Current user profile
curl --request GET \
--url https://org-api.hexoforge.dev/api/v1/pub/{project_id}/auth/me \
--header 'X-API-Key: <api-key>'import requests
url = "https://org-api.hexoforge.dev/api/v1/pub/{project_id}/auth/me"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://org-api.hexoforge.dev/api/v1/pub/{project_id}/auth/me', 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://org-api.hexoforge.dev/api/v1/pub/{project_id}/auth/me",
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-Key: <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://org-api.hexoforge.dev/api/v1/pub/{project_id}/auth/me"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<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://org-api.hexoforge.dev/api/v1/pub/{project_id}/auth/me")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://org-api.hexoforge.dev/api/v1/pub/{project_id}/auth/me")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": {},
"email": "<string>",
"name": {},
"phone": {},
"is_active": true,
"email_verified": true,
"totp_enabled": true,
"metadata": {},
"last_login_method": {},
"roles": [
"<string>"
],
"permissions": [
"<string>"
]
}Public API
Current user profile
Fetch the authenticated user’s profile from the database.
GET
/
api
/
v1
/
pub
/
{project_id}
/
auth
/
me
Current user profile
curl --request GET \
--url https://org-api.hexoforge.dev/api/v1/pub/{project_id}/auth/me \
--header 'X-API-Key: <api-key>'import requests
url = "https://org-api.hexoforge.dev/api/v1/pub/{project_id}/auth/me"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://org-api.hexoforge.dev/api/v1/pub/{project_id}/auth/me', 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://org-api.hexoforge.dev/api/v1/pub/{project_id}/auth/me",
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-Key: <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://org-api.hexoforge.dev/api/v1/pub/{project_id}/auth/me"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<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://org-api.hexoforge.dev/api/v1/pub/{project_id}/auth/me")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://org-api.hexoforge.dev/api/v1/pub/{project_id}/auth/me")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": {},
"email": "<string>",
"name": {},
"phone": {},
"is_active": true,
"email_verified": true,
"totp_enabled": true,
"metadata": {},
"last_login_method": {},
"roles": [
"<string>"
],
"permissions": [
"<string>"
]
}Returns the current user record. Requires
Each successful call hits the database.
X-API-Key and a valid Bearer access token.
Send both
X-API-Key and Authorization: Bearer with your access token. Prefer local JWT validation with JWKS for hot paths; use this endpoint as a fallback or for testing.Response
200 OK{
"id": "550e8400-e29b-41d4-a716-446655440000",
"email": "user@example.com",
"name": "Jane Doe",
"phone": "+1234567890",
"is_active": true,
"email_verified": true,
"totp_enabled": false,
"metadata": { "plan": "pro" },
"last_login_method": "email",
"roles": ["user", "editor"],
"permissions": ["read:posts", "write:posts"]
}
string (uuid)
User identifier.
string
Email address.
string | null
Display name.
string | null
Phone.
boolean
Whether the account is active.
boolean
Email verification state.
boolean
Whether TOTP is enabled.
object
Custom metadata.
string | null
Last authentication method.
string[]
Role slugs.
string[]
Permission slugs.
Status codes
| Code | Meaning |
|---|---|
| 200 | Success |
| 401 | Missing, invalid, or revoked token |
| 403 | IP or firewall block, or email verification required |
| 429 | Rate limited |