Show examples in:
    Retrieve current signed-in user

    Query parameters

    include  string  Optional

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


    Example code:
    import { buildClient } from '@datocms/cma-client-node';
    async function run() {
    const client = buildClient({ apiToken: '<YOUR_API_TOKEN>' });
    const user = await client.users.findMe({
    include: 'role'
    Returned output:
    id: '312',
    email: '',
    is_2fa_active: true,
    full_name: 'Mark Smith',
    is_active: true,
    meta: {
    last_access: '2018-03-25T21:50:24.914Z'
    role: {
    type: 'role',
    id: '34'