Skip to content

Finding Your REDCap API Token

Shawn Garbett edited this page Jan 25, 2023 · 1 revision

In order to use the REDCap API for a given REDCap project, you must first be given a token that is specific to your username for that particular project. Rather than using username/passwords, the REDCap API uses tokens as a means of secure authentication, in which a token must be included in every API request. Please note that each user will have a different token for each REDCap project to which they have access. Thus, multiple tokens will be required for making API requests to multiple projects.

To obtain an API token for a project, navigate to that project, then click the API link in the Applications sidebar. On that page you will be able to request an API token for the project from your REDCap administrator, and that page will also display your API token if one has already been assigned. If you do not see a link for the API page on your project's left-hand menu, then someone must first give you API privileges within the project (via the project's User Rights page). [from the REDCap API Documentation]

A visual set of instructions follows:

  1. Navigate to your REDCap home page and log in.

  2. Click on the tab for "My Projects" and select a project for which you wish to request and API token

  3. Click on the API option in the left navigation panel

  4. If you do not yet have a token, press the "Request Token" button. A request will be sent to your REDCap administrator. Once the administrator has approved your request, proceed to the next step (this may take a day or two, depending on your administrator).

  5. Return to the page in step 4 to retrieve your API token

  6. Use this token in redcapConnection(token=[your_token]).