SDK
SDK Javascript v7.x
2

deleteApiKey #

Available since 7.1.0
Available since Kuzzle 2.1.0

Deletes a user's API key.


Copied to clipboard!
deleteApiKey(userId, id, [options]);

Property Type Description
userId
string
User kuid
id
string
API key unique ID
options
object
Additional options

options #

Additional query options

Property Type
(default)
Description
refresh
boolean

(false)
If set to wait_for, Kuzzle will not respond until the API key is indexed

Resolves #

Resolves if the API key is successfully deleted.

Usage #

Copied to clipboard!
try {
  await kuzzle.security.deleteApiKey('john.doe', 'fQRa28BsidO6V_wmOcL');
  console.log('API key successfully deleted');
} catch (e) {
  console.error(e);
}