Generate an API token for a user
POST/public/api-tokens/:userId
Mints a bearer API token that authenticates subsequent API requests as the specified user. The returned token should be sent as an Authorization: Bearer <token> header. The caller must be the target user or have admin rights over them. The token expires after the duration returned as expiresIn (seconds).
Request
Responses
- 200
- 400
- 403
- 404
Token successfully issued.
userId is missing or invalid.
Authenticated caller is not the target user and does not have admin rights over them.
Target user does not exist.