Skip to main content

Get User Info API

Overview​

The Get User Info API allows an authenticated caller to retrieve information about themselves based on their authentication token, including the status of their associated access wallet, tenant group membership, and admin privileges.


Endpoint​

GET /tnt/:tid/user

Authentication​

This API requires the caller to be authenticated using a user token CSAT.


Path Parameters​

NameTypeRequiredDescription
tidstringYesTenant ID

Required Headers​

HeaderValue
Acceptapplication/json
AuthorizationBearer <token>

Response​

Success Response (HTTP 200)​

Returned when the user info is retrieved successfully.

Fields​

FieldDescription
tenant_idTenant ID the user belongs to
user_addressUser wallet address derived from the auth token
user_idExternal user ID or identity (from JWT)
user_access_walletOn-chain access wallet address (if exists)
is_tenant_adminTrue if user is a tenant admin
is_content_adminTrue if user is a content admin
is_tenant_userTrue if user is a regular tenant user
groupsList of groups the user belongs to
metadataOptional metadata about the user
errorError message if any issue occurs

Example Success Response​

{
"tenant_id": "<tenantId>",
"user_address": "0xabc123...",
"user_id": "user@example.com",
"user_access_wallet": "0xdef456...",
"is_tenant_admin": false,
"is_content_admin": false,
"is_tenant_user": true,
"groups": [
{ "id": "group1", "name": "Subscribers" }
],
"metadata": {}
}

Error Response​

Bad Request (400)

{
"error": "failed to retrieve user info"
}

Notes​

  • The user_access_wallet field will be empty if the user does not yet have a wallet; call Create User Access Wallet first.
  • The groups array shows the groups the user belongs to within the tenant.