Skip to main content
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 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"]
}
id
string (uuid)
User identifier.
email
string
Email address.
name
string | null
Display name.
phone
string | null
Phone.
is_active
boolean
Whether the account is active.
email_verified
boolean
Email verification state.
totp_enabled
boolean
Whether TOTP is enabled.
metadata
object
Custom metadata.
last_login_method
string | null
Last authentication method.
roles
string[]
Role slugs.
permissions
string[]
Permission slugs.
Each successful call hits the database.

Status codes

CodeMeaning
200Success
401Missing, invalid, or revoked token
403IP or firewall block, or email verification required
429Rate limited