Skip to contents

Validates the REDCap API token stored in the project object by attempting a connection to the REDCap server.

Usage

test_project_token(project, launch_browser = TRUE)

Arguments

project

A validated project object containing REDCap project data and settings. Generated using load_project or setup_project

launch_browser

Logical (TRUE/FALSE). If TRUE, launches the REDCap login page in the default web browser when validation fails. Default is TRUE.

Value

Logical. Returns TRUE if the API token is valid, otherwise FALSE.

Details

This function tests whether the API token stored in the project object is valid by making a request to the REDCap server. If the token is invalid, the function can optionally open the REDCap login page in a browser (launch_browser)