Generate an API token for a REDCap project and assign it to a specified user
Source:R/credential_management.R
set_project_api_token.Rd
Generate an API token for a REDCap project and assign it to a specified user
Arguments
- conn
a DBI database connection, such as that from
get_redcap_db_connection
- username
a REDCap username
This user must already have access to the project, i.e. they must appear in the project's User Rights- project_id
The project id of the project for which you wish to generate a token
Examples
if (FALSE) { # \dontrun{
conn <- get_redcap_db_connection()
my_new_token <- set_project_api_token(conn, "admin", 15)
} # }