denyAccess Last updated: 18. Feb 2026
API only function
This function exits and returns a login required error.
Parameters
This function takes no parameters
Returns
A login required error result with HTTP code 401.
Example
Code example (JS)
JS is normal JavaScript either running in the browser or on the Docly™ server.// Check access with for excample the Jwt, see function WriteJwt to login users with Jwt.
if (request.Jwt.access !== "admin")
return docly.denyAccess();