Description
CSRF tokens are required for making calls within the sandbox, as they are executed by the browser on behalf of users.
Conditions of acceptance
- Create a new endpoint that allows the user to request a token from within the MW REST API.
- Endpoint is surfaced within the MW REST API as a vBeta endpoint for testing purposes.
- Route: GET rest.php/vBeta/tokens/csrf --> Route naming up for debate/input -- we may release other types of developer tokens/authentication mechanisms, such as a developer JWT and/or OAuth workflows.
- Returns a token that can then be used within additional REST request bodies.
Implementation details
Action API endpoint for fetching CSRF tokens: https://www.mediawiki.org/wiki/API:Tokens