Skip to content

Function: enableAdminKey()

ts
function enableAdminKey(client, parameters): Promise<{
[key: string]: unknown;
  accountId?: string;
  expirationTime?: Date;
}>;

Defined in: src/v2/api/adminKey.ts:32

Enables admin key access for the calling user within the site. If an admin key already exists for the user, a new one will be issued with an updated expiration time.

Note: The durationInMinutes field within the request body is optional. If the request body is empty or if the durationInMinutes is set to 0 minutes, a new admin key will be issued to the calling user with a default duration of 10 minutes.

Permissions required: User must be an organization or site admin.

Parameters

ParameterType
clientClient
parameters{ body?: Record&lt;string, any>; }
parameters.body?Record&lt;string, any>

Returns

Promise&lt;{ [key: string]: unknown; accountId?: string; expirationTime?: Date; }>