Docs

createTestingToken()

Creates a Testing Token for the instance. It only works on development instances.

function createTestingToken: () => Promise<TestingToken>;
const response = await clerk.testingTokens.createTestingToken();

console.log(response);
/*
_TestingToken {
  token: '1714041000-6U8-ejqcpDoGT-CDGjrRucyt-p6LoUMDHMMOUK5CjHI',
  expires_at: 1714044600
}
*/

Backend API (BAPI) endpoint

This method in the SDK is a wrapper around the BAPI endpoint POST/testing_tokens. See the BAPI reference for more details.

Feedback

What did you think of this content?