Exposes REDCap's External Module API for adding, removing, or searching for usernames in the REDCap allowlist. Requests require a super API token.
Version 2.0 replaces the custom page endpoint used in version 1.x with REDCap's native External Module API. Existing integrations must be updated: requests to ?type=module&prefix=user_allowlist_api&page=api are no longer supported. Send requests to /api/ using content=externalModule, prefix=user_allowlist_api, and the desired action, as shown below.
The add, remove, and search actions and the user parameter are retained. Authentication is now handled by REDCap's API framework; requests must use a super API token as before.
curl --request POST \
--url https://redcap.example.org/api/ \
--header 'content-type: application/x-www-form-urlencoded' \
--data content=externalModule \
--data prefix=user_allowlist_api \
--data token=SUPER_API_TOKEN \
--data format=json \
--data returnFormat=json \
--data action=add \
--data-urlencode user=username{
"status": "string", // 'success' or 'failure'
"message": "string", // Explanation of the action
"value": bool // true or false; null for an application-level error
}Use action=remove or action=search to remove or check a username. Project-scoped API tokens are not accepted.
You can install the module from the REDCap EM repo or drop it directly in your modules folder (i.e. redcap/modules/user_allowlist_api_v1.0.0).