Show examples in:
JavascriptHTTP
Endpoint info
Available examples
Dashboard API > Account

Generates 2-factor authorization secrets

Warning: Experimental API

Please note that the Dashboard API is an experimental, prerelease API. This API method is considered unstable, and should be avoided in production environments and automations. Changes may occur at any time without warning.

Returns

Returns a resource object of type 2fa_reset

Examples

import { buildClient } from "@datocms/dashboard-client";
async function run() {
const client = buildClient({ apiToken: process.env.DATOCMS_API_TOKEN });
const account = await client.account.reset_2Fa();
// Check the 'Returned output' tab for the result ☝️
console.log(account);
}
run();
{ id: "412", provisioning_2fa_uri: "" }