Skip to content

SSO API Documentation

Single Sign-On (SSO) source management endpoints for creating, updating, and deleting SSO integration sources.

Create an SSO Source

POST /api.php

API Usage Notes

  • Authentication required: Admin API Key
  • Legacy endpoint access via /api.php only (no v1 REST alias configured)

Request Body Parameters:

ParameterTypeRequiredDescription
CommandStringYesAPI command: sso.create
SessionIDStringNoSession ID obtained from login
APIKeyStringNoAPI key for authentication
SourceNameStringYesName of the SSO source
SourceCodeStringYesUnique code for the SSO source (alphanumeric, underscores, and hyphens only)
SourceDescriptionStringNoDescription of the SSO source
ExpiresAtStringNoExpiration date and time (format: YYYY-MM-DD HH:MM:SS)
ValidForSecondsIntegerYesToken validity duration in seconds (must be >= 1)
OptionsObjectNoSSO options configuration
Options.CreateNewUserIfNotExistsStringNoCreate new user if not exists (Enabled or Disabled)
Options.PerformLoginStringNoPerform automatic login (Enabled or Disabled)
Options.ReturnUserDataStringNoReturn user data in response (Enabled or Disabled)
bash
curl -X POST https://example.com/api.php \
  -H "Content-Type: application/json" \
  -d '{
    "Command": "sso.create",
    "SessionID": "your-session-id",
    "SourceName": "External Portal",
    "SourceCode": "external_portal_v1",
    "SourceDescription": "SSO integration for external portal",
    "ExpiresAt": "2025-12-31 23:59:59",
    "ValidForSeconds": 3600,
    "Options": {
      "CreateNewUserIfNotExists": "Enabled",
      "PerformLogin": "Enabled",
      "ReturnUserData": "Enabled"
    }
  }'
json
{
  "Success": true,
  "ErrorCode": 0,
  "ErrorText": "",
  "SSOSourceID": 123
}
json
{
  "Success": false,
  "ErrorCode": [1, 2],
  "ErrorText": ["Missing sourcename", "Missing sourcecode"]
}
txt
0: Success
1: Missing sourcename
2: Missing sourcecode
4: Invalid sourcecode (must contain only alphanumeric characters, underscores, and hyphens)
5: Invalid expiresat (must be in YYYY-MM-DD HH:MM:SS format)
6: sourcecode already exists
7: Missing validforseconds
8: Invalid validforseconds (must be numeric and >= 1)

Update an SSO Source

POST /api.php

API Usage Notes

  • Authentication required: Admin API Key
  • Legacy endpoint access via /api.php only (no v1 REST alias configured)

Request Body Parameters:

ParameterTypeRequiredDescription
CommandStringYesAPI command: sso.update
SessionIDStringNoSession ID obtained from login
APIKeyStringNoAPI key for authentication
SourceIDIntegerYesID of the SSO source to update
SourceNameStringYesName of the SSO source
SourceCodeStringYesUnique code for the SSO source (alphanumeric, underscores, and hyphens only)
SourceDescriptionStringNoDescription of the SSO source
ExpiresAtStringNoExpiration date and time (format: YYYY-MM-DD HH:MM:SS)
ValidForSecondsIntegerYesToken validity duration in seconds (must be >= 1)
OptionsObjectNoSSO options configuration
Options.CreateNewUserIfNotExistsStringNoCreate new user if not exists (Enabled or Disabled)
Options.PerformLoginStringNoPerform automatic login (Enabled or Disabled)
Options.ReturnUserDataStringNoReturn user data in response (Enabled or Disabled)
bash
curl -X POST https://example.com/api.php \
  -H "Content-Type: application/json" \
  -d '{
    "Command": "sso.update",
    "SessionID": "your-session-id",
    "SourceID": 123,
    "SourceName": "Updated External Portal",
    "SourceCode": "external_portal_v2",
    "SourceDescription": "Updated SSO integration for external portal",
    "ExpiresAt": "2026-12-31 23:59:59",
    "ValidForSeconds": 7200,
    "Options": {
      "CreateNewUserIfNotExists": "Disabled",
      "PerformLogin": "Enabled",
      "ReturnUserData": "Enabled"
    }
  }'
json
{
  "Success": true,
  "ErrorCode": 0,
  "ErrorText": ""
}
json
{
  "Success": false,
  "ErrorCode": [9, 10],
  "ErrorText": ["Missing sourceid", "Invalid sourceid"]
}
txt
0: Success
1: Missing sourcename
2: Missing sourcecode
4: Invalid sourcecode (must contain only alphanumeric characters, underscores, and hyphens)
5: Invalid expiresat (must be in YYYY-MM-DD HH:MM:SS format)
6: sourcecode already exists
7: Missing validforseconds
8: Invalid validforseconds (must be numeric and >= 1)
9: Missing sourceid
10: Invalid sourceid

Delete an SSO Source

POST /api.php

API Usage Notes

  • Authentication required: Admin API Key
  • Legacy endpoint access via /api.php only (no v1 REST alias configured)

Request Body Parameters:

ParameterTypeRequiredDescription
CommandStringYesAPI command: sso.delete
SessionIDStringNoSession ID obtained from login
APIKeyStringNoAPI key for authentication
SourceIDStringYesID of the SSO source to delete (can be comma-separated list for multiple deletions)
bash
curl -X POST https://example.com/api.php \
  -H "Content-Type: application/json" \
  -d '{
    "Command": "sso.delete",
    "SessionID": "your-session-id",
    "SourceID": "123"
  }'
json
{
  "Success": true,
  "ErrorCode": 0
}
json
{
  "Success": false,
  "ErrorCode": [1]
}
txt
0: Success
1: Missing sourceid

Any questions? Contact us.