Delete a MotherDuck user’s access token

Source: R/api.R

Deletes a specific access token for a given MotherDuck user using the REST API. This operation requires administrative privileges.

Usage

delete_md_access_token(user_name, token_name)

Arguments

user_name

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

token_name

Character. The name of the access token to delete.

Value

A tibble summarizing the API response, typically including the username and deletion status of the token.

Details

This function calls the MotherDuck REST API endpoint ⁠https://api.motherduck.com/v1/users/{user_name}/tokens/{token_name}⁠ using a DELETE request to remove the specified token.

Uses the token from the MOTHERDUCK_TOKEN environment variable for authorization. The authenticated user must have sufficient permissions to perform token management.

See Also

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

Examples

# Delete a token named "temp_token" for user "alejandro_hagan"
delete_md_access_token(
  user_name = "alejandro_hagan",
  token_name = "temp_token"
)