Sorry, no results found for "".
Email
"foo@bar.com"
Password
"changeme"
Two-factor authentication one-time password
"123512"
Returns a resource object of type session
1import { buildClient } from "@datocms/cma-client-node";2 3async function run() {4 const client = buildClient({ apiToken: process.env.DATOCMS_API_TOKEN });5 6 const session = await client.session.create({7 email: "foo@bar.com",8 password: "changeme",9 });10 11 // Check the 'Returned output' tab for the result ☝️12 console.log(session);13}14 15run();
1{ id: "eyJCJhbGci.eyJhaWwuY29tIn0.32wQOMci", user: { type: "user", id: "312" } }