import SGPClient from 'sgp';
const client = new SGPClient({
apiKey: 'My API Key',
});
const userInfo = await client.users.info();
console.log(userInfo.id);{
"id": "<string>",
"email": "<string>",
"access_profiles": [
{
"id": "<string>",
"identity": {
"id": "<string>",
"type": "user",
"object": "identity"
},
"role": "manager",
"account": {
"id": "<string>",
"name": "<string>",
"status": "<string>",
"organization_id": "<string>"
}
}
],
"first_name": "<string>",
"last_name": "<string>",
"organization_id": "<string>",
"is_organization_admin": true,
"is_deployment_admin": true,
"preferences": {},
"assumed_access_profile": {
"id": "<string>",
"identity": {
"id": "<string>",
"type": "user",
"object": "identity"
},
"role": "manager",
"account": {
"id": "<string>",
"name": "<string>",
"status": "<string>",
"organization_id": "<string>"
}
}
}Get basic information for the logged in user making this request including preferences.
import SGPClient from 'sgp';
const client = new SGPClient({
apiKey: 'My API Key',
});
const userInfo = await client.users.info();
console.log(userInfo.id);{
"id": "<string>",
"email": "<string>",
"access_profiles": [
{
"id": "<string>",
"identity": {
"id": "<string>",
"type": "user",
"object": "identity"
},
"role": "manager",
"account": {
"id": "<string>",
"name": "<string>",
"status": "<string>",
"organization_id": "<string>"
}
}
],
"first_name": "<string>",
"last_name": "<string>",
"organization_id": "<string>",
"is_organization_admin": true,
"is_deployment_admin": true,
"preferences": {},
"assumed_access_profile": {
"id": "<string>",
"identity": {
"id": "<string>",
"type": "user",
"object": "identity"
},
"role": "manager",
"account": {
"id": "<string>",
"name": "<string>",
"status": "<string>",
"organization_id": "<string>"
}
}
}Successful Response
User id
E-mail address
A list of access profiles that the selected user has access to
Show child attributes
Access profile id.
The role of the user in the access profile.
manager, admin, editor, member, labeler, disabled, invited, viewer First name
Last name
The organization ID of the user.
True if the current user is an organization admin.
True if the current user is a deployment admin.
User preferences that can be stored in the Scale GenAI Platform.
Present if the user has assumed a specific access profile via JWT token.
Show child attributes
Access profile id.
The role of the user in the access profile.
manager, admin, editor, member, labeler, disabled, invited, viewer The account in the access profile.