Python
import os
from scale_gp import SGPClient
client = SGPClient(
api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted
)
user_info = client.users.info()
print(user_info.id)package main
import (
"context"
"fmt"
"github.com/stainless-sdks/sgp-go"
"github.com/stainless-sdks/sgp-go/option"
)
func main() {
client := sgp.NewClient(
option.WithAPIKey("My API Key"),
)
userInfo, err := client.Users.Info(context.TODO())
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", userInfo.ID)
}
curl --request GET \
--url https://api.egp.scale.com/user-infoconst options = {method: 'GET'};
fetch('https://api.egp.scale.com/user-info', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.egp.scale.com/user-info",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://api.egp.scale.com/user-info")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.egp.scale.com/user-info")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"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>"
}
}
}Users
User info
Get basic information for the logged in user making this request including preferences.
GET
/
user-info
Python
import os
from scale_gp import SGPClient
client = SGPClient(
api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted
)
user_info = client.users.info()
print(user_info.id)package main
import (
"context"
"fmt"
"github.com/stainless-sdks/sgp-go"
"github.com/stainless-sdks/sgp-go/option"
)
func main() {
client := sgp.NewClient(
option.WithAPIKey("My API Key"),
)
userInfo, err := client.Users.Info(context.TODO())
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", userInfo.ID)
}
curl --request GET \
--url https://api.egp.scale.com/user-infoconst options = {method: 'GET'};
fetch('https://api.egp.scale.com/user-info', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.egp.scale.com/user-info",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://api.egp.scale.com/user-info")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.egp.scale.com/user-info")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"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>"
}
}
}Response
200 - application/json
Successful Response
User id
E-mail address
A list of access profiles that the selected user has access to
Show child attributes
Show child attributes
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
Show child attributes

