Skip to main content

Auth API

The Auth API provides methods for user authentication and API key management. Access via client.auth:

Methods

me()

Get the current authenticated user’s information.
Returns: Promise<User> Example:
Response type:

listApiKeys()

List all API keys for the authenticated user.
Returns: Promise<ApiKeyInfo[]> Example:
Response type:

createApiKey(name?)

Create a new named API key.
Parameters: Returns: Promise<ApiKeyCreateResponse> Example:
The full API key (result.key) is only returned once at creation. Store it securely.
Response type:

revokeApiKey(keyId?)

Revoke an API key by its ID.
Parameters: Returns: Promise<void> Example:

See Also