List a MotherDuck user’s tokens

Source: R/api.R

Retrieves all active authentication tokens associated with a specific MotherDuck user account, returning them as a tidy tibble.

Usage

list_md_user_tokens(user_name)

Arguments

user_name

A character string specifying the MotherDuck user name whose tokens should be listed.

Value

A tibble with two columns:

  • token_settings: metadata fields associated with each token.

  • token_values: corresponding values for those fields.

Details

This function queries the MotherDuck REST API endpoint ⁠https://api.motherduck.com/v1/users/{user_name}/tokens⁠ to list the tokens available for the specified user.

Uses the token from the MOTHERDUCK_TOKEN environment variable for authorization.

See Also

Other db-api: configure_md_user_settings(), create_md_access_token(), create_md_user(), delete_md_access_token(), delete_md_user(), list_md_active_accounts(), list_md_user_instance(), show_current_user()

Examples

# List tokens for a specific user
tokens_tbl <- list_md_user_tokens(user_name = "alejandro_hagan")
print(tokens_tbl)