GET
/
user-info
import SGPClient from 'sgp';

const client = new SGPClient({
  apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted
});

async function main() {
  const userInfo = await client.users.info();

  console.log(userInfo.id);
}

main();
{
  "id": "<string>",
  "first_name": "<string>",
  "last_name": "<string>",
  "email": "<string>",
  "access_profiles": [
    {
      "id": "<string>",
      "user_id": "<string>",
      "role": "manager",
      "account": {
        "id": "<string>",
        "name": "<string>"
      }
    }
  ],
  "organization_id": "<string>",
  "is_organization_admin": true,
  "preferences": {},
  "assumed_access_profile": {
    "id": "<string>",
    "user_id": "<string>",
    "role": "manager",
    "account": {
      "id": "<string>",
      "name": "<string>"
    }
  }
}

Authorizations

x-api-key
string
header
required

Response

200
application/json
Successful Response
id
string
required

User id

email
string
required

E-mail address

access_profiles
object[]
required

A list of access profiles that the selected user has access to

first_name
string

First name

last_name
string

Last name

organization_id
string

The organization ID of the user.

is_organization_admin
boolean

True if the current user is an organization admin.

preferences
object

User preferences that can be stored in the Scale GenAI Platform.

assumed_access_profile
object

Present if the user has assumed a specific access profile via JWT token.