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(
  origin = pal::pkg_config_val("origin"),
  email = pal::pkg_config_val("email"),
  password = pal::pkg_config_val("password"),
  api_token = NULL,
  auth = TRUE
)

Arguments

origin

character(1)
NocoDB server origin.

email

character(1)
E-mail address of the NocoDB user to authenticate with.

password

character(1)
Password of the NocoDB user to authenticate with.

api_token

character(1)
NocoDB API token. Takes precedence over email and password if provided.

auth

logical(1)
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.