Authentication
Get current authenticated user
Returns information about the currently authenticated user, including their role (user or organization). For organization users, also returns organization details and team role.
GET
/
v1
/
auth
/
me
Get current authenticated user
curl --request GET \
--url https://api.hyperprop.com/platform/v1/auth/meimport requests
url = "https://api.hyperprop.com/platform/v1/auth/me"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.hyperprop.com/platform/v1/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://api.hyperprop.com/platform/v1/auth/me",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://api.hyperprop.com/platform/v1/auth/me"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.hyperprop.com/platform/v1/auth/me")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperprop.com/platform/v1/auth/me")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"user_id": "550e8400-e29b-41d4-a716-446655440000",
"email": "user@example.com",
"email_verified": true,
"providers": [
"google"
],
"role": "user",
"organization": {
"id": "org-550e8400-e29b-41d4-a716-446655440000",
"status": "active",
"name": "Acme Corporation",
"description": "Leading provider of enterprise solutions",
"contactEmail": "contact@acme.com",
"websiteUrl": "https://acme.com",
"logoUrl": "https://storage.example.com/logos/acme-logo.png"
},
"teamRole": "admin",
"roleName": "Support",
"permissions": {
"analytics": "view",
"traders": "manage",
"payouts": "view",
"plans": "view",
"webhooks": "none",
"operations": "manage",
"billing": "none",
"team": "none",
"settings": "none"
}
}
}{
"success": false,
"statusCode": 401,
"error": "Unauthorized",
"message": "Authentication required",
"code": "UNAUTHORIZED"
}{
"success": false,
"statusCode": 500,
"error": "Internal Server Error",
"message": "An unexpected error occurred",
"code": "INTERNAL_ERROR"
}Related topics
Get all trading accounts for the authenticated userGet one of the authenticated user’s PnL cardsGet current trading account with equity and P&LGet open positions with real-time P&LGet own user profile⌘I
Get current authenticated user
curl --request GET \
--url https://api.hyperprop.com/platform/v1/auth/meimport requests
url = "https://api.hyperprop.com/platform/v1/auth/me"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.hyperprop.com/platform/v1/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://api.hyperprop.com/platform/v1/auth/me",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://api.hyperprop.com/platform/v1/auth/me"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.hyperprop.com/platform/v1/auth/me")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperprop.com/platform/v1/auth/me")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"user_id": "550e8400-e29b-41d4-a716-446655440000",
"email": "user@example.com",
"email_verified": true,
"providers": [
"google"
],
"role": "user",
"organization": {
"id": "org-550e8400-e29b-41d4-a716-446655440000",
"status": "active",
"name": "Acme Corporation",
"description": "Leading provider of enterprise solutions",
"contactEmail": "contact@acme.com",
"websiteUrl": "https://acme.com",
"logoUrl": "https://storage.example.com/logos/acme-logo.png"
},
"teamRole": "admin",
"roleName": "Support",
"permissions": {
"analytics": "view",
"traders": "manage",
"payouts": "view",
"plans": "view",
"webhooks": "none",
"operations": "manage",
"billing": "none",
"team": "none",
"settings": "none"
}
}
}{
"success": false,
"statusCode": 401,
"error": "Unauthorized",
"message": "Authentication required",
"code": "UNAUTHORIZED"
}{
"success": false,
"statusCode": 500,
"error": "Internal Server Error",
"message": "An unexpected error occurred",
"code": "INTERNAL_ERROR"
}