The API Tokens endpoints let you create and manage long-lived authentication tokens for programmatic access to the Hoody platform. Use these endpoints to issue scoped tokens with IP restrictions, expiration, and fine-grained permissions, and to manage their lifecycle (update, copy, add/remove realm bindings, delete).
Returns all auth tokens for the authenticated user. Token values are not included in the response.
curl -X GET https://api.hoody.icu/api/v1/auth/tokens \
-H " Authorization: Bearer <token> "
const tokens = await client . api . authTokens . listIterator ();
"message" : " Auth tokens retrieved successfully " ,
"id" : " 507f1f77bcf86cd799439011 " ,
"alias" : " Production API Key " ,
"ip_whitelist" : [ " 192.168.1.0/24 " , " 10.0.0.1 " ],
"expires_at" : " 2025-12-31T23:59:59.000Z " ,
"last_used_at" : " 2025-10-28T12:00:00.000Z " ,
"last_used_ip" : " 198.51.100.1 " ,
"created_at" : " 2025-01-15T10:30:00.000Z " ,
"updated_at" : " 2025-01-15T14:45:00.000Z "
"id" : " 507f1f77bcf86cd799439022 " ,
"alias" : " Development Token " ,
"realm_ids" : [ " 507f1f77bcf86cd799439011 " ],
"created_at" : " 2025-01-10T08:00:00.000Z " ,
"updated_at" : " 2025-01-10T08:00:00.000Z "
"message" : " Authentication token required "
Error Code Title Description Resolution MISSING_TOKENAuthentication token missing No authentication token was provided in the request Include a valid JWT token in the Authorization header as “Bearer <token>“ INVALID_TOKENInvalid authentication token The provided authentication token is malformed or invalid Obtain a new token by logging in again or using a valid auth token TOKEN_EXPIREDAuthentication token expired The provided authentication token has expired Obtain a new token by logging in again or refreshing your session
Returns details of a specific auth token. The token value is not included in the response.
curl -X GET https://api.hoody.icu/api/v1/auth/tokens/507f1f77bcf86cd799439011 \
-H " Authorization: Bearer <token> "
const token = await client . api . authTokens . get ( { id: " 507f1f77bcf86cd799439011 " } );
Name In Type Required Description idpath string Yes Unique identifier of the token
"message" : " Auth token retrieved successfully " ,
"id" : " 507f1f77bcf86cd799439011 " ,
"alias" : " Production API Key " ,
"ip_whitelist" : [ " 192.168.1.0/24 " , " 10.0.0.1 " ],
"expires_at" : " 2025-12-31T23:59:59.000Z " ,
"last_used_at" : " 2025-10-28T12:00:00.000Z " ,
"last_used_ip" : " 198.51.100.1 " ,
"created_at" : " 2025-01-15T10:30:00.000Z " ,
"updated_at" : " 2025-01-15T14:45:00.000Z "
"message" : " Invalid ID format "
Error Code Title Description Resolution INVALID_ID_FORMATInvalid ID format The provided ID must be a 24-character hexadecimal string Ensure the ID is exactly 24 characters long and contains only hexadecimal characters (0-9, a-f)
"message" : " Authentication token required "
Error Code Title Description Resolution MISSING_TOKENAuthentication token missing No authentication token was provided in the request Include a valid JWT token in the Authorization header as “Bearer <token>“ INVALID_TOKENInvalid authentication token The provided authentication token is malformed or invalid Obtain a new token by logging in again or using a valid auth token TOKEN_EXPIREDAuthentication token expired The provided authentication token has expired Obtain a new token by logging in again or refreshing your session
"message" : " Authentication token not found "
Error Code Title Description Resolution TOKEN_NOT_FOUNDAuthentication token not found The requested authentication token does not exist or has been deleted Verify the token ID is correct and that the token still exists
Returns metadata, permissions, and realm restrictions for the currently authenticated auth token. This endpoint is allowed on the base api.hoody.icu domain for realm-scoped tokens to bootstrap realm discovery.
curl -X GET https://api.hoody.icu/api/v1/auth/tokens/me \
-H " Authorization: Bearer <token> "
const current = await client . api . authTokens . getCurrent ();
"message" : " Current auth token retrieved successfully " ,
"id" : " 507f1f77bcf86cd799439011 " ,
"alias" : " External Customer Token " ,
"realm_ids" : [ " 507f1f77bcf86cd799439012 " ],
"created_at" : " 2025-01-15T10:30:00.000Z " ,
"updated_at" : " 2025-01-15T10:30:00.000Z "
"has_realm_restrictions" : true ,
"requires_realm_scope" : true ,
"allowed_realm_ids" : [ " 507f1f77bcf86cd799439012 " ],
"active_realm_id" : " 507f1f77bcf86cd799439012 "
"message" : " Authentication token required "
Error Code Title Description Resolution MISSING_TOKENAuthentication token missing No authentication token was provided in the request Include a valid JWT token in the Authorization header as “Bearer <token>“ INVALID_TOKENInvalid authentication token The provided authentication token is malformed or invalid Obtain a new token by logging in again or using a valid auth token TOKEN_EXPIREDAuthentication token expired The provided authentication token has expired Obtain a new token by logging in again or refreshing your session
"message" : " Insufficient permissions "
Error Code Title Description Resolution INSUFFICIENT_PERMISSIONSInsufficient permissions You do not have the required permissions to perform this action Contact the resource owner or administrator to request access
Resolves and retrieves an auth token’s public profile storage by ED25519 public key.
curl -X GET https://api.hoody.icu/api/v1/auth/tokens/public-profiles/a1b2c3d4e5f6789012345678901234567890abcdefabcdefabcdefabcdef1234 \
-H " Authorization: Bearer <token> "
const profile = await client . api . authTokens . getPublicProfile ( {
public_key: " a1b2c3d4e5f6789012345678901234567890abcdefabcdefabcdefabcdef1234 "
Name In Type Required Description public_keypath string Yes ED25519 public key to resolve
"message" : " Public profile retrieved successfully " ,
"public_key" : " a1b2c3d4e5f6789012345678901234567890abcdefabcdefabcdefabcdef1234 " ,
"display_name" : " Acme Integrations " ,
"website" : " https://example.com "
"message" : " Invalid public key format "
Error Code Title Description Resolution VALIDATION_ERRORInvalid input parameters One or more request parameters failed validation Check the error message for specific field requirements and correct your input INVALID_PUBLIC_KEY_FORMATInvalid public key format Public key must be exactly 64 hexadecimal characters (ED25519 format) Provide a valid 64-character ED25519 public key in hexadecimal format
"message" : " Authentication token required "
Error Code Title Description Resolution MISSING_TOKENAuthentication token missing No authentication token was provided in the request Include a valid JWT token in the Authorization header as “Bearer <token>“ INVALID_TOKENInvalid authentication token The provided authentication token is malformed or invalid Obtain a new token by logging in again or using a valid auth token TOKEN_EXPIREDAuthentication token expired The provided authentication token has expired Obtain a new token by logging in again or refreshing your session
"message" : " Authentication token not found "
Error Code Title Description Resolution TOKEN_NOT_FOUNDAuthentication token not found The requested authentication token does not exist or has been deleted Verify the token ID is correct and that the token still exists
Creates a new long-term authentication token with optional IP restrictions, expiration, and fine-grained permissions.
curl -X POST https://api.hoody.icu/api/v1/auth/tokens \
-H " Authorization: Bearer <token> " \
-H " Content-Type: application/json " \
"alias": "Production API Key",
"public_key": "a1b2c3d4e5f6789012345678901234567890abcdefabcdefabcdefabcdef1234",
"display_name": "Production Integrations",
"ip_whitelist": ["192.168.1.0/24", "10.0.0.1"],
"expires_at": 1767225599000
const result = await client . api . authTokens . create ( {
alias: " Production API Key " ,
public_key: " a1b2c3d4e5f6789012345678901234567890abcdefabcdefabcdefabcdef1234 " ,
display_name: " Production Integrations " ,
ip_whitelist: [ " 192.168.1.0/24 " , " 10.0.0.1 " ] ,
expires_at: 1767225599000
Field Type Required Description aliasstring No User-friendly alias. Allowed characters: letters, numbers, spaces, underscores, hyphens. If omitted, a random animal name is generated. public_keystring | null No ED25519 public key (64 hex chars) or null to clear. public_storageobject | null No Public JSON profile storage (max 64KB) or null to clear. ip_whitelistarray | string No Array of IPv4 addresses/CIDR ranges, comma-separated string, or * wildcard. Defaults to *. permission_templatestring No Permission template to apply (full_access, external_customer, dev_team, finance_team, read_only). Takes precedence over permissions. permissionsobject No Fine-grained permission map. Missing paths default to false. realm_idsarray No Realm IDs to restrict this token to. allow_no_realmboolean No Whether the token can be used without a realm scope. Default: true. vault_accessboolean No Whether the token can access user vault endpoints. Default: false. event_accessboolean No Whether the token can access event streams. Default: true. expires_atstring | number No ISO 8601 date, Unix timestamp, today, or tomorrow. otp_codestring No TOTP code (6 digits) or backup code (10 alphanumeric). Required if 2FA is enabled and authenticating via JWT.
"message" : " Auth token created successfully " ,
"token" : " hdy_a1b2c3d4e5f67890abcdef1234567890 " ,
"id" : " 507f1f77bcf86cd799439011 " ,
"alias" : " Production API Key " ,
"public_key" : " a1b2c3d4e5f6789012345678901234567890abcdefabcdefabcdefabcdef1234 " ,
"display_name" : " Production Integrations " ,
"ip_whitelist" : [ " 192.168.1.0/24 " , " 10.0.0.1 " ],
"expires_at" : " 2025-12-31T23:59:59.000Z " ,
"created_at" : " 2025-01-15T10:30:00.000Z " ,
"updated_at" : " 2025-01-15T10:30:00.000Z "
"message" : " Validation failed "
Error Code Title Description Resolution VALIDATION_ERRORInvalid input parameters One or more request parameters failed validation Check the error message for specific field requirements and correct your input MISSING_REQUIRED_FIELDRequired field missing One or more required fields are missing from the request Include all required fields as specified in the API documentation OTP_REQUIRED2FA verification required This operation requires 2FA verification because your account has 2FA enabled Provide an otp_code field with a valid TOTP code or backup code INVALID_ALIAS_FORMATInvalid alias format Token alias must contain only letters, numbers, spaces, underscores, and hyphens Use only allowed characters: letters (a-z, A-Z), numbers (0-9), spaces, underscores (_), and hyphens (-) INVALID_IP_FORMATInvalid IP address format IP whitelist must contain valid IPv4 addresses or CIDR ranges Provide valid IPv4 addresses (e.g., 192.168.1.1) or CIDR ranges (e.g., 192.168.1.0/24), or use * for all IPs INVALID_REALM_ID_FORMATInvalid realm ID format Realm IDs must be 24-character hexadecimal strings Ensure all realm IDs are valid 24-character hex strings (e.g., 507f1f77bcf86cd799439011) INVALID_EXPIRATION_FORMATInvalid expiration format Expiration must be an ISO 8601 date, Unix timestamp, today, tomorrow, or null Use a valid date format: ISO 8601 string, Unix timestamp (seconds/milliseconds), today, tomorrow, or null for non-expiring INVALID_PUBLIC_KEY_FORMATInvalid public key format Public key must be exactly 64 hexadecimal characters (ED25519 format) Provide a valid 64-character ED25519 public key in hexadecimal format PUBLIC_STORAGE_TOO_LARGEPublic storage exceeds size limit public_storage must not exceed 64KB serialized JSONReduce the size of the public storage payload and retry EXPIRATION_IN_PASTExpiration date in the past The expiration date cannot be in the past Provide a future date for token expiration
"message" : " Authentication token required "
Error Code Title Description Resolution MISSING_TOKENAuthentication token missing No authentication token was provided in the request Include a valid JWT token in the Authorization header as “Bearer <token>“ INVALID_TOKENInvalid authentication token The provided authentication token is malformed or invalid Obtain a new token by logging in again or using a valid auth token TOKEN_EXPIREDAuthentication token expired The provided authentication token has expired Obtain a new token by logging in again or refreshing your session
"message" : " Token alias already exists "
Error Code Title Description Resolution DUPLICATE_ALIASToken alias already exists You already have an authentication token with this alias Choose a different unique alias for this token
Atomically adds a realm ID to an auth token. Idempotent — if the realm is already present, returns success without modification.
curl -X POST https://api.hoody.icu/api/v1/auth/tokens/507f1f77bcf86cd799439011/add-realm \
-H " Authorization: Bearer <token> " \
-H " Content-Type: application/json " \
"realm_id": "507f1f77bcf86cd799439012"
const result = await client . api . authTokens . addRealm ( {
id: " 507f1f77bcf86cd799439011 " ,
data: { realm_id: " 507f1f77bcf86cd799439012 " }
Name In Type Required Description idpath string Yes Auth token ID
Field Type Required Description realm_idstring Yes Realm ID to add to the token otp_codestring No TOTP code (6 digits) or backup code (10 alphanumeric). Required if 2FA is enabled and authenticating via JWT.
"message" : " Realm added to auth token successfully " ,
"id" : " 507f1f77bcf86cd799439011 " ,
"alias" : " External Customer Token " ,
"realm_ids" : [ " 507f1f77bcf86cd799439012 " , " 507f1f77bcf86cd799439013 " ],
"containers" : { "read" : true }
"created_at" : " 2025-01-15T10:30:00.000Z " ,
"updated_at" : " 2025-01-15T15:00:00.000Z "
"message" : " Invalid realm ID format "
Error Code Title Description Resolution OTP_REQUIRED2FA verification required This operation requires 2FA verification because your account has 2FA enabled Provide an otp_code field with a valid TOTP code or backup code INVALID_REALM_ID_FORMATInvalid realm ID format Realm IDs must be 24-character hexadecimal strings Ensure all realm IDs are valid 24-character hex strings (e.g., 507f1f77bcf86cd799439011)
"message" : " Authentication token required "
"message" : " Authentication token not found "
Copies an existing auth token’s configuration (permissions, realm restrictions, IP whitelist) into a new token with a new secret value.
curl -X POST https://api.hoody.icu/api/v1/auth/tokens/507f1f77bcf86cd799439011/copy \
-H " Authorization: Bearer <token> " \
-H " Content-Type: application/json " \
"alias": "Production API Key Copy"
const result = await client . api . authTokens . copy ( {
id: " 507f1f77bcf86cd799439011 " ,
data: { alias: " Production API Key Copy " }
Name In Type Required Description idpath string Yes Unique identifier of the token
Field Type Required Description aliasstring No Optional alias for the copied token. If omitted, a deterministic alias like "<source> copy" is generated. expires_atstring | number | null No ISO 8601 date, Unix timestamp, today, tomorrow, or null for non-expiring. Defaults to source expiration. otp_codestring No TOTP code (6 digits) or backup code (10 alphanumeric). Required if 2FA is enabled and authenticating via JWT.
"message" : " Auth token copied successfully " ,
"token" : " hdy_f0e1d2c3b4a5968778695a4b3c2d1e0f1234567890abcdef " ,
"id" : " 507f1f77bcf86cd799439099 " ,
"alias" : " Production API Key Copy " ,
"ip_whitelist" : [ " 192.168.1.0/24 " , " 10.0.0.1 " ],
"realm_ids" : [ " 507f1f77bcf86cd799439011 " ],
"containers" : { "read" : true }
"expires_at" : " 2025-12-31T23:59:59.000Z " ,
"created_at" : " 2025-01-20T08:30:00.000Z " ,
"updated_at" : " 2025-01-20T08:30:00.000Z "
"message" : " Validation failed "
Error Code Title Description Resolution VALIDATION_ERRORInvalid input parameters One or more request parameters failed validation Check the error message for specific field requirements and correct your input INVALID_ID_FORMATInvalid ID format The provided ID must be a 24-character hexadecimal string Ensure the ID is exactly 24 characters long and contains only hexadecimal characters (0-9, a-f) OTP_REQUIRED2FA verification required This operation requires 2FA verification because your account has 2FA enabled Provide an otp_code field with a valid TOTP code or backup code INVALID_ALIAS_FORMATInvalid alias format Token alias must contain only letters, numbers, spaces, underscores, and hyphens Use only allowed characters: letters (a-z, A-Z), numbers (0-9), spaces, underscores (_), and hyphens (-) INVALID_EXPIRATION_FORMATInvalid expiration format Expiration must be an ISO 8601 date, Unix timestamp, today, tomorrow, or null Use a valid date format: ISO 8601 string, Unix timestamp (seconds/milliseconds), today, tomorrow, or null for non-expiring EXPIRATION_IN_PASTExpiration date in the past The expiration date cannot be in the past Provide a future date for token expiration
"message" : " Authentication token required "
Error Code Title Description Resolution MISSING_TOKENAuthentication token missing No authentication token was provided in the request Include a valid JWT token in the Authorization header as “Bearer <token>“ INVALID_TOKENInvalid authentication token The provided authentication token is malformed or invalid Obtain a new token by logging in again or using a valid auth token TOKEN_EXPIREDAuthentication token expired The provided authentication token has expired Obtain a new token by logging in again or refreshing your session
"message" : " Insufficient permissions "
Error Code Title Description Resolution INSUFFICIENT_PERMISSIONSInsufficient permissions You do not have the required permissions to perform this action Contact the resource owner or administrator to request access ACCOUNT_BANNEDAccount banned Your account has been banned and cannot access this resource Contact support for information about your account status
"message" : " Authentication token not found "
Error Code Title Description Resolution TOKEN_NOT_FOUNDAuthentication token not found The requested authentication token does not exist or has been deleted Verify the token ID is correct and that the token still exists
"message" : " Token alias already exists "
Error Code Title Description Resolution DUPLICATE_ALIASToken alias already exists You already have an authentication token with this alias Choose a different unique alias for this token
Atomically removes a realm ID from an auth token. Idempotent — if the realm is not present, returns success without modification.
curl -X POST https://api.hoody.icu/api/v1/auth/tokens/507f1f77bcf86cd799439011/remove-realm \
-H " Authorization: Bearer <token> " \
-H " Content-Type: application/json " \
"realm_id": "507f1f77bcf86cd799439012"
const result = await client . api . authTokens . removeRealm ( {
id: " 507f1f77bcf86cd799439011 " ,
data: { realm_id: " 507f1f77bcf86cd799439012 " }
Name In Type Required Description idpath string Yes Auth token ID
Field Type Required Description realm_idstring Yes Realm ID to remove from the token otp_codestring No TOTP code (6 digits) or backup code (10 alphanumeric). Required if 2FA is enabled and authenticating via JWT.
"message" : " Realm removed from auth token successfully " ,
"id" : " 507f1f77bcf86cd799439011 " ,
"alias" : " External Customer Token " ,
"containers" : { "read" : true }
"created_at" : " 2025-01-15T10:30:00.000Z " ,
"updated_at" : " 2025-01-15T15:10:00.000Z "
"message" : " Invalid realm ID format "
Error Code Title Description Resolution OTP_REQUIRED2FA verification required This operation requires 2FA verification because your account has 2FA enabled Provide an otp_code field with a valid TOTP code or backup code INVALID_REALM_ID_FORMATInvalid realm ID format Realm IDs must be 24-character hexadecimal strings Ensure all realm IDs are valid 24-character hex strings (e.g., 507f1f77bcf86cd799439011)
"message" : " Authentication token required "
"message" : " Authentication token not found "
Updates an existing auth token’s alias, public key/profile storage, IP restrictions, expiration, enabled status, permissions, or realm bindings.
curl -X PATCH https://api.hoody.icu/api/v1/auth/tokens/507f1f77bcf86cd799439011 \
-H " Authorization: Bearer <token> " \
-H " Content-Type: application/json " \
"alias": "Updated Production Key",
const updated = await client . api . authTokens . update ( {
id: " 507f1f77bcf86cd799439011 " ,
alias: " Updated Production Key " ,
Name In Type Required Description idpath string Yes Unique identifier of the token to update
Field Type Required Description aliasstring No User-friendly alias. Allowed characters: letters, numbers, spaces, underscores, hyphens. public_keystring | null No ED25519 public key (64 hex chars) or null to clear. public_storageobject | null No Public JSON profile storage (max 64KB) or null to clear. ip_whitelistarray | string No Array of IPv4 addresses/CIDR ranges, comma-separated string, or * wildcard. permissionsobject No Fine-grained permission map. Missing paths default to false. realm_idsarray No Realm IDs to restrict this token to. allow_no_realmboolean No Whether the token can be used without a realm scope. vault_accessboolean No Whether the token can access user vault endpoints. event_accessboolean No Whether the token can access event streams and event history. expires_atstring | number | null No ISO 8601 date, Unix timestamp, today, tomorrow, or null for non-expiring. is_enabledboolean No Enable or disable the token. otp_codestring No TOTP code (6 digits) or backup code (10 alphanumeric). Required if 2FA is enabled and authenticating via JWT.
"message" : " Auth token updated successfully " ,
"id" : " 507f1f77bcf86cd799439011 " ,
"alias" : " Updated Production Key " ,
"containers" : { "read" : true }
"last_used_at" : " 2025-10-28T12:00:00.000Z " ,
"last_used_ip" : " 198.51.100.1 " ,
"created_at" : " 2025-01-15T10:30:00.000Z " ,
"updated_at" : " 2025-01-15T14:45:00.000Z "
"message" : " Validation failed "
Error Code Title Description Resolution VALIDATION_ERRORInvalid input parameters One or more request parameters failed validation Check the error message for specific field requirements and correct your input INVALID_ID_FORMATInvalid ID format The provided ID must be a 24-character hexadecimal string Ensure the ID is exactly 24 characters long and contains only hexadecimal characters (0-9, a-f) OTP_REQUIRED2FA verification required This operation requires 2FA verification because your account has 2FA enabled Provide an otp_code field with a valid TOTP code or backup code INVALID_ALIAS_FORMATInvalid alias format Token alias must contain only letters, numbers, spaces, underscores, and hyphens Use only allowed characters: letters (a-z, A-Z), numbers (0-9), spaces, underscores (_), and hyphens (-) INVALID_IP_FORMATInvalid IP address format IP whitelist must contain valid IPv4 addresses or CIDR ranges Provide valid IPv4 addresses (e.g., 192.168.1.1) or CIDR ranges (e.g., 192.168.1.0/24), or use * for all IPs INVALID_REALM_ID_FORMATInvalid realm ID format Realm IDs must be 24-character hexadecimal strings Ensure all realm IDs are valid 24-character hex strings (e.g., 507f1f77bcf86cd799439011) INVALID_EXPIRATION_FORMATInvalid expiration format Expiration must be an ISO 8601 date, Unix timestamp, today, tomorrow, or null Use a valid date format: ISO 8601 string, Unix timestamp (seconds/milliseconds), today, tomorrow, or null for non-expiring INVALID_PUBLIC_KEY_FORMATInvalid public key format Public key must be exactly 64 hexadecimal characters (ED25519 format) Provide a valid 64-character ED25519 public key in hexadecimal format PUBLIC_STORAGE_TOO_LARGEPublic storage exceeds size limit public_storage must not exceed 64KB serialized JSONReduce the size of the public storage payload and retry EXPIRATION_IN_PASTExpiration date in the past The expiration date cannot be in the past Provide a future date for token expiration
"message" : " Authentication token required "
Error Code Title Description Resolution MISSING_TOKENAuthentication token missing No authentication token was provided in the request Include a valid JWT token in the Authorization header as “Bearer <token>“ INVALID_TOKENInvalid authentication token The provided authentication token is malformed or invalid Obtain a new token by logging in again or using a valid auth token TOKEN_EXPIREDAuthentication token expired The provided authentication token has expired Obtain a new token by logging in again or refreshing your session
"message" : " Authentication token not found "
Error Code Title Description Resolution TOKEN_NOT_FOUNDAuthentication token not found The requested authentication token does not exist or has been deleted Verify the token ID is correct and that the token still exists
"message" : " Token alias already exists "
Error Code Title Description Resolution DUPLICATE_ALIASToken alias already exists You already have an authentication token with this alias Choose a different unique alias for this token
Updates the current auth token’s public_key and public_storage payload. Requires the resources.auth_token_public_profile permission on the auth token.
curl -X PATCH https://api.hoody.icu/api/v1/auth/tokens/me/public-profile \
-H " Authorization: Bearer <token> " \
-H " Content-Type: application/json " \
"public_key": "a1b2c3d4e5f6789012345678901234567890abcdefabcdefabcdefabcdef1234",
"username_hint": "acme-team",
"avatar": "https://cdn.example.com/avatar.png"
const updated = await client . api . authTokens . updatePublicProfile ( {
public_key: " a1b2c3d4e5f6789012345678901234567890abcdefabcdefabcdefabcdef1234 " ,
username_hint: " acme-team " ,
avatar: " https://cdn.example.com/avatar.png "
Field Type Required Description public_keystring | null No ED25519 public key (64 hex chars) or null to clear. public_storageobject | null No Public JSON profile storage (max 64KB) or null to clear.
At least one of public_key or public_storage must be provided.
"message" : " Public profile updated successfully " ,
"id" : " 507f1f77bcf86cd799439011 " ,
"alias" : " External Customer Token " ,
"public_key" : " a1b2c3d4e5f6789012345678901234567890abcdefabcdefabcdefabcdef1234 " ,
"username_hint" : " acme-team " ,
"avatar" : " https://cdn.example.com/avatar.png "
"realm_ids" : [ " 507f1f77bcf86cd799439012 " ],
"containers" : { "read" : true }
"created_at" : " 2025-01-15T10:30:00.000Z " ,
"updated_at" : " 2025-01-15T15:00:00.000Z "
"message" : " Validation failed "
Error Code Title Description Resolution VALIDATION_ERRORInvalid input parameters One or more request parameters failed validation Check the error message for specific field requirements and correct your input INVALID_PUBLIC_KEY_FORMATInvalid public key format Public key must be exactly 64 hexadecimal characters (ED25519 format) Provide a valid 64-character ED25519 public key in hexadecimal format PUBLIC_STORAGE_TOO_LARGEPublic storage exceeds size limit public_storage must not exceed 64KB serialized JSONReduce the size of the public storage payload and retry
"message" : " Authentication token required "
Error Code Title Description Resolution MISSING_TOKENAuthentication token missing No authentication token was provided in the request Include a valid JWT token in the Authorization header as “Bearer <token>“ INVALID_TOKENInvalid authentication token The provided authentication token is malformed or invalid Obtain a new token by logging in again or using a valid auth token TOKEN_EXPIREDAuthentication token expired The provided authentication token has expired Obtain a new token by logging in again or refreshing your session
"message" : " Insufficient permissions "
Error Code Title Description Resolution INSUFFICIENT_PERMISSIONSInsufficient permissions You do not have the required permissions to perform this action Contact the resource owner or administrator to request access
Deletes an auth token. Once deleted, the token can no longer be used for authentication.
curl -X DELETE https://api.hoody.icu/api/v1/auth/tokens/507f1f77bcf86cd799439011 \
-H " Authorization: Bearer <token> "
await client . api . authTokens . delete ({ id: " 507f1f77bcf86cd799439011 " });
Name In Type Required Description idpath string Yes Unique identifier of the token
"message" : " Auth token deleted successfully "
"message" : " Invalid ID format "
Error Code Title Description Resolution INVALID_ID_FORMATInvalid ID format The provided ID must be a 24-character hexadecimal string Ensure the ID is exactly 24 characters long and contains only hexadecimal characters (0-9, a-f)
"message" : " Authentication token required "
Error Code Title Description Resolution MISSING_TOKENAuthentication token missing No authentication token was provided in the request Include a valid JWT token in the Authorization header as “Bearer <token>“ INVALID_TOKENInvalid authentication token The provided authentication token is malformed or invalid Obtain a new token by logging in again or using a valid auth token TOKEN_EXPIREDAuthentication token expired The provided authentication token has expired Obtain a new token by logging in again or refreshing your session
"message" : " Insufficient permissions "
Error Code Title Description Resolution INSUFFICIENT_PERMISSIONSInsufficient permissions You do not have the required permissions to perform this action Contact the resource owner or administrator to request access ACCOUNT_BANNEDAccount banned Your account has been banned and cannot access this resource Contact support for information about your account status
"message" : " Authentication token not found "
Error Code Title Description Resolution TOKEN_NOT_FOUNDAuthentication token not found The requested authentication token does not exist or has been deleted Verify the token ID is correct and that the token still exists