Skip to contents

Returns a tibble with metadata about the specified user from a NocoDB server via its GET /api/v1/auth/user/me API endpoint.

Usage

whoami(
  hostname = pal::pkg_config_val("hostname"),
  email = pal::pkg_config_val("email"),
  password = pal::pkg_config_val("password"),
  api_token = NULL,
  auth = TRUE
)

Arguments

hostname

NocoDB server hostname. A character scalar.

email

E-mail address of the NocoDB user to authenticate with.

password

Password of the NocoDB user to authenticate with.

api_token

NocoDB API token. Takes precedence over email and password if provided.

auth

Whether or not to include an authentication header in the HTTP request.

Value

A tibble with metadata about the specified NocoDB user.

Details

The user is determined based on api_token or email and password (the former takes precedence). The returned columns differ between the two modes of authentication.

The API endpoint does not require authentication. If an invalid api_token is provided, the request still succeeds and generic data for a guest user is returned, same as for auth = FALSE.