Show examples in:
Rotate API token

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.regenerateToken(accessTokenId);
console.log(accessToken);
}
run();