Show examples in:
Delete an API token

Query parameters

destination_user_type  Optional  enum  Example: "user"

New owner for resources previously owned by the deleted access token. This argument specifies the new owner type.

destination_user_id  Optional  string  Example: "7865"

New owner for resources previously owned by the deleted access token. This argument specifies the new owner ID.

Returns

Returns a access_token resource object.

Examples

Example Basic example
import { buildClient } from '@datocms/cma-client-node';
async function run() {
const client = buildClient({ apiToken: '<YOUR_API_TOKEN>' });
const accessTokenId = '312';
const accessToken = await client.accessTokens.destroy(accessTokenId);
console.log(accessToken);
}
run();