Get override codes (deprecated)
Deprecated
client.zeroTrust.devices.overrideCodes.list(stringdeviceID, OverrideCodeListParams { account_id } params, RequestOptionsoptions?): OverrideCodeListResponse { disable_for_time } | null
GET/accounts/{account_id}/devices/{device_id}/override_codes
Fetches a one-time use admin override code for a device. This relies on the Admin Override setting being enabled in your device configuration. Not supported when multi-user mode is enabled for the account. Deprecated: please use GET /accounts/{account_id}/devices/registrations/{registration_id}/override_codes instead.
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example:
API Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
Example:
The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
Example:
Accepted Permissions (at least one required)
Parameters
deviceID: string
Registration ID. Equal to Device ID except for accounts which enabled multi-user mode.
maxLength36
Get override codes (deprecated)
import Cloudflare from 'cloudflare';
const client = new Cloudflare({
apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted
});
const overrideCodes = await client.zeroTrust.devices.overrideCodes.list(
'f174e90a-fafe-4643-bbbc-4a0ed4fc8415',
{ account_id: '699d98642c564d2e855e9661899b7252' },
);
console.log(overrideCodes.disable_for_time);{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"result": {
"disable_for_time": {
"1": "9106681",
"3": "5356247",
"6": "9478972",
"12": "3424359",
"24": "2887634"
}
},
"success": true
}Returns Examples
{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"result": {
"disable_for_time": {
"1": "9106681",
"3": "5356247",
"6": "9478972",
"12": "3424359",
"24": "2887634"
}
},
"success": true
}