Account and organization
Get information about your user account, organization, and subscription details.
User information
Retrieve information about the currently authenticated user:
- Shell
- Python
- TypeScript
- C#
curl -X POST https://uthana.com/graphql \
-u $API_KEY: \
-H "Content-Type: application/json" \
-d '{
"query": "{ user { id email email_verified name roles tz tos_accepted survey_completed } }"
}'
import requests
API_URL = 'https://uthana.com/graphql'
API_KEY = '{{apiKey}}'
query = '''
query {
user {
id
email
email_verified
name
roles
tz
tos_accepted
survey_completed
}
}
'''
response = requests.post(
API_URL,
auth=(API_KEY, ''),
json={'query': query}
)
result = response.json()
user = result["data"]["user"]
print(f"User: {user['name']} ({user['email']})")
print(f"Email verified: {user['email_verified']}")
print(f"Roles: {user['roles']}")
const API_URL = "https://uthana.com/graphql";
const API_KEY = "{{apiKey}}";
const authString = btoa(`${API_KEY}:`);
const response = await fetch(API_URL, {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: `Basic ${authString}`,
},
body: JSON.stringify({
query: `
query {
user {
id
email
email_verified
name
roles
tz
tos_accepted
survey_completed
}
}
`,
}),
});
const json = await response.json();
const user = json.data.user;
console.log(`User: ${user.name} (${user.email})`);
console.log(`Email verified: ${user.email_verified}`);
console.log(`Roles: ${user.roles}`);
private const string ApiUrl = "https://uthana.com/graphql";
private readonly string _apiKey = "{{apiKey}}";
public async Task<User> GetUserAsync()
{
var query = @"
query {
user {
id
email
email_verified
name
roles
tz
tos_accepted
survey_completed
}
}";
var request = new { query = query };
var json = JsonSerializer.Serialize(request);
var content = new StringContent(json, Encoding.UTF8, "application/json");
var authValue = Convert.ToBase64String(Encoding.UTF8.GetBytes($"{_apiKey}:"));
_httpClient.DefaultRequestHeaders.Authorization =
new System.Net.Http.Headers.AuthenticationHeaderValue("Basic", authValue);
var response = await _httpClient.PostAsync(ApiUrl, content);
response.EnsureSuccessStatusCode();
var responseJson = await response.Content.ReadAsStringAsync();
var result = JsonSerializer.Deserialize<GraphQLResponse<UserData>>(responseJson);
return result.Data.User;
}
// Usage
var user = await GetUserAsync();
Console.WriteLine($"User: {user.Name} ({user.Email})");
Console.WriteLine($"Email verified: {user.EmailVerified}");
Console.WriteLine($"Roles: {string.Join(", ", user.Roles)}");
Organization information
Get information about your organization, including download allowances:
- Shell
- Python
- TypeScript
- C#
curl -X POST https://uthana.com/graphql \
-u $API_KEY: \
-H "Content-Type: application/json" \
-d '{
"query": "{ org { id name motion_download_secs_per_month motion_download_secs_per_month_remaining users { id name email } } }"
}'
query = '''
query {
org {
id
name
motion_download_secs_per_month
motion_download_secs_per_month_remaining
users {
id
name
email
}
}
}
'''
response = requests.post(
API_URL,
auth=(API_KEY, ''),
json={'query': query}
)
result = response.json()
org = result["data"]["org"]
print(f"Organization: {org['name']}")
print(f"Download allowance: {org['motion_download_secs_per_month']} seconds/month")
print(f"Remaining: {org['motion_download_secs_per_month_remaining']} seconds")
print(f"Users: {len(org['users'])}")
const response = await fetch(API_URL, {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: `Basic ${authString}`,
},
body: JSON.stringify({
query: `
query {
org {
id
name
motion_download_secs_per_month
motion_download_secs_per_month_remaining
users {
id
name
email
}
}
}
`,
}),
});
const json = await response.json();
const org = json.data.org;
console.log(`Organization: ${org.name}`);
console.log(`Download allowance: ${org.motion_download_secs_per_month} seconds/month`);
console.log(`Remaining: ${org.motion_download_secs_per_month_remaining} seconds`);
console.log(`Users: ${org.users.length}`);
public async Task<Org> GetOrgAsync()
{
var query = @"
query {
org {
id
name
motion_download_secs_per_month
motion_download_secs_per_month_remaining
users {
id
name
email
}
}
}";
var request = new { query = query };
var json = JsonSerializer.Serialize(request);
var content = new StringContent(json, Encoding.UTF8, "application/json");
var response = await _httpClient.PostAsync(ApiUrl, content);
response.EnsureSuccessStatusCode();
var responseJson = await response.Content.ReadAsStringAsync();
var result = JsonSerializer.Deserialize<GraphQLResponse<OrgData>>(responseJson);
return result.Data.Org;
}
// Usage
var org = await GetOrgAsync();
Console.WriteLine($"Organization: {org.Name}");
Console.WriteLine($"Download allowance: {org.MotionDownloadSecsPerMonth} seconds/month");
Console.WriteLine($"Remaining: {org.MotionDownloadSecsPerMonthRemaining} seconds");
Console.WriteLine($"Users: {org.Users.Count}");
Subscription information
Subscription and billing details are managed through the Uthana web interface. For API access to plan limits and usage, see the Pricing and Rate limits pages.
Next steps
- Explore Asset management for managing your characters and motions
- Check the API reference for complete schema documentation