Report the server's authentication mode
GET
/api/v1/auth/mode
const url = 'https://example.com/api/v1/auth/mode';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/api/v1/auth/modeUnauthenticated: lets a client decide whether to show a login screen.
Responses
Section titled “Responses”Successful Response
Media typeapplication/json
object
success
required
boolean
data
required
AuthMode
Whether this deployment requires credentials.
object
auth_enabled
required
Auth Enabled
boolean
auth_disabled
required
Auth Disabled
boolean
access_token_expires_in
required
Access Token Expires In
Seconds.
integer
refresh_token_expires_in
required
Refresh Token Expires In
Seconds.
integer
Example
{ "success": true, "data": { "auth_enabled": true, "auth_disabled": false, "access_token_expires_in": 1800, "refresh_token_expires_in": 604800 }}