Skip to main content

Overview

The ServerResource provides methods for retrieving server information, managing API tokens, and checking server capabilities. Access it via client.server after creating your SpeckleClient.

Methods

get()

Get detailed information about the Speckle server.
Parameters: None Returns:
ServerInfo
Server information object
Example:
See ServerInfo for property details.

version()

Get the server version as a parsed tuple for easy version comparison.
Parameters: None Returns:
Tuple
Version tuple in format (major, minor, patch) or (major, minor, patch, tag, build) for pre-release versions
Example:

apps()

Get the list of apps registered on the server.
Parameters: None Returns:
Dict
Dictionary of registered apps
Example:
See App for property details.

create_token()

Create a new personal API token programmatically.
Parameters:
str
required
A descriptive name for the token
List[str]
required
List of scope names to grant
int
required
Token lifespan in seconds
Returns:
str
The newly created token string
The token is only shown once when created. Store it securely immediately!
Example:
Common Scopes:
  • streams:read - Read project/stream data
  • streams:write - Write project/stream data
  • profile:read - Read user profile
  • profile:email - Access user email
  • profile:delete - Delete user profile
  • users:read - Read other user information
  • users:email - Access other user emails
  • tokens:read - Read token information
  • tokens:write - Create/revoke tokens

revoke_token()

Revoke (delete) a personal API token.
Parameters:
str
required
The token string to revoke
Returns:
bool
True if the token was successfully revoked
Example:
You can only revoke tokens that belong to your authenticated account.

Types

ServerInfo

Represents detailed information about a Speckle server.
str
Server name
str
Company name
str
Server description
str
Admin contact email
str
Server canonical URL
str
Server version string (e.g., “3.0.0”)
List[Scope]
Available API scopes - name (str) - Scope name - description (str) - Scope description
List[AuthStrategy]
Available authentication strategies - id (str) - Strategy ID - name (str) - Strategy name - icon (str, optional) - Icon URL
WorkspacesInfo
Workspace feature information - workspacesEnabled (bool) - Whether workspaces are enabled

App

Represents an application registered on the Speckle server.
str
App ID
str
App name
str
App description
Terms and conditions URL
bool
Whether app is trusted by default
App logo URL
dict
App author information - id (str) - Author user ID - name (str) - Author name - avatar (str, optional) - Author avatar URL

FAQ

Use get() to retrieve server information and check capabilities:
Use the version() method which returns a comparable tuple:
Request only the scopes you need:
  • Read-only access: ["streams:read", "profile:read"]
  • Basic read/write: ["streams:read", "streams:write", "profile:read"]
  • Automation/CI: ["streams:read", "streams:write", "profile:read", "tokens:write"]
  • Admin operations: Check server’s available scopes with get()
Use client.server.get().scopes to see all available scopes and their descriptions.
Token lifespan recommendations:
  • Development/testing: 7-30 days (604800 - 2592000 seconds)
  • CI/CD pipelines: 90-365 days (7776000 - 31536000 seconds)
  • Production services: 365 days, with rotation strategy
  • Temporary access: 1-7 days (86400 - 604800 seconds)
The ServerResource doesn’t provide a method to list tokens directly. To manage your tokens:
  1. Log in to the Speckle web interface
  2. Go to your profile settings
  3. Navigate to “Personal Access Tokens”
  4. View and manage all your tokens there
Alternatively, use the ActiveUserResource methods if available in your version.
The server will reject the request if you specify scopes that don’t exist or that you don’t have access to. Always check available scopes first:

SpeckleClient

Main client documentation

ActiveUserResource

User profile operations
Last modified on July 18, 2026