#Account
#Who am I
GET /meAbility: read
Returns the login that owns the token, the account it belongs to and the token's abilities. Handy as a "does my token work" check.
curl
Python
Node.js
PHP
curl 'https://proxykite.com/api/v1/me' \
-H "Authorization: Bearer $HYP_TOKEN" \
-H 'Accept: application/json'import os
import requests
r = requests.get(
"https://proxykite.com/api/v1/me",
headers={"Authorization": f"Bearer {os.environ['HYP_TOKEN']}", "Accept": "application/json"},
timeout=30,
)
print(r.status_code, r.json())const res = await fetch('https://proxykite.com/api/v1/me', {
headers: {
Authorization: `Bearer ${process.env.HYP_TOKEN}`,
Accept: 'application/json',
},
signal: AbortSignal.timeout(30000),
});
console.log(res.status, await res.json());<?php
$ch = curl_init('https://proxykite.com/api/v1/me');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('HYP_TOKEN'),
'Accept: application/json',
],
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
var_dump($status, json_decode($body, true));Response 200
{"data": {
"id": 15, "name": "Alice", "email": "alice@example.com",
"role": "customer", "team_role": null, "account_id": 15,
"abilities": ["rotate"]
}}| Field | Meaning |
|---|---|
id, name, email | the login |
role | customer for an account owner, subuser for team members and reseller sub-users (admin for staff) |
team_role | null for the account owner and reseller sub-users; admin or viewer for team members |
account_id | id of the account owner (same as id for the owner) |
abilities | the token's level: ["read"], ["rotate"] or ["manage"] |