Generate authentication token using email address, password, and tenant GUID.
To generate authentication token (using password), call GET /v1.0/token
curl --location --request GET 'http://localhost:8701/v1.0/token' \
--header 'x-email: [email protected]' \
--header 'x-password: password' \
--header 'x-tenant-guid: 00000000-0000-0000-0000-000000000000'
import { LiteGraphSdk } from "litegraphdb";
var api = new LiteGraphSdk(
"http://localhost:8701/",
"<Tenant-Guid>",
"*******"
);
const generateToken = async () => {
try {
const data = await api.Authentication.generateToken(
"[email protected]",
"pass****",
"<tenant-guid>"
);
console.log(data, "Token generated successfully");
} catch (err) {
console.log("err:", JSON.stringify(err));
}
};
import litegraph
sdk = litegraph.configure(
endpoint="http://localhost:8701",
tenant_guid="Tenant-Guid",
access_key="******",
)
def generate_authentication_token():
token = litegraph.Authentication.generate_authentication_token(email="[email protected]", password="pass****", tenant_guid="tenant-guid")
print(token)
generate_authentication_token()
Response
{
"TimestampUtc": "2025-09-09T10:27:10.892667Z",
"ExpirationUtc": "2025-09-10T10:27:10.892667Z",
"IsExpired": false,
"TenantGUID": "00000000-0000-0000-0000-000000000000",
"UserGUID": "2bfe8b6e-53ac-4aa6-80fc-905ad154049f",
"Token": "*******",
"Valid": true
}