Sorry, no results found for "".

Show examples in:
Javascript HTTP
Endpoint info
Available examples

Content Management API > Collaborator

Retrieve current signed-in user

Query parameters

include string

Comma-separated list of relationship paths. A relationship path is a dot-separated list of relationship names. Allowed relationship paths: role.

Example: "role"

Examples

import { buildClient } from "@datocms/cma-client-node";
async function run() {
const client = buildClient({ apiToken: process.env.DATOCMS_API_TOKEN });
const user = await client.users.findMe();
// Check the 'Returned output' tab for the result ☝️
console.log(user);
}
run();
{
id: "312",
email: "mark.smith@example.com",
is_2fa_active: true,
full_name: "Mark Smith",
is_active: true,
role: { type: "role", id: "34" },
}