Skip to main content

Overview

specklepy uses personal access tokens to authenticate with Speckle Server.
Tokens are managed through your Speckle Server profile and can be scoped to limit permissions.

Get a Personal Access Token

1

Log into Speckle

Go to your Speckle Server (e.g., app.speckle.systems)
2

Access Your Profile

Click your avatar → Settings → Profile → Developer → Access Tokens
3

Create Token

Click “New Token”, give it a name and select the required scopes, then copy the token.
Store your token securely! Treat them like a password: do not post them anywhere where they could be accessed by others (e.g., public repos).

Token-Based Authentication

The primary way to authenticate:
Best practice for all environments:
Set the environment variable:
Using python-dotenv:
Create .env file:
Load in your script:

Local Account Files (Optional)

For local development, you can use account credentials stored by Speckle desktop connectors:
Local accounts are created by signing in and authenticating with any Speckle desktop connector (Revit, Rhino, Grasshopper, AutoCAD, etc.).Account files are stored in:
  • Windows: %APPDATA%\Speckle\Accounts
  • macOS: ~/.config/Speckle/Accounts
  • Linux: ~/.local/share/Speckle/Accounts
Those paths are created when you add an account in a Speckle desktop client.

Account Object Structure

An Account object contains:

Different Speckle Servers

Connect to Different Servers

SSL Certificate Verification

For self-hosted servers with self-signed certificates:
Only disable certificate verification for trusted internal servers.

Authentication Best Practices

Choose the authentication method that best fits your use case:
Use environment variables or local accounts:Store tokens in .env files (not committed to git) or use local account files.

Checking Authentication Status

Verify your client is authenticated:

Token Scopes

When creating a token, you can limit its permissions: Scopes will be documented later but for now you can view all those available in the Access Token creation step:
Token Scopes
Follow the principle of least privilege - only grant the scopes your application needs.
Scopes retain the nomenclature of v2 Speckle where project is stream

Common Authentication Errors

Error: 403 Forbidden or Invalid tokenSolution:
  • Verify the token is correct (no extra spaces)
  • Check the token hasn’t been revoked
  • Ensure the token has the required scopes
  • Generate a new token if needed
Error: Connection refused or Failed to connectSolution:
  • Verify the server URL is correct
  • Check your internet connection
  • For local servers, ensure the server is running
  • Check firewall settings
Error: SSL: CERTIFICATE_VERIFY_FAILEDSolution:
  • For self-signed certificates, use verify_certificate=False
  • Install the certificate in your system’s trust store
  • For production, use properly signed certificates
Error: No default account foundSolution:
  • Use token authentication instead:

Security Best Practices

Do: - Store tokens in environment variables - Use .gitignore to exclude .env files - Rotate tokens periodically - Use scoped tokens with minimal permissions - Revoke tokens when no longer needed
Don’t: - Commit tokens to version control - Share tokens between team members - Use tokens in client-side code (use OAuth instead) - Store tokens in plain text files - Use overly permissive scopes

Next Steps

Now that you’re authenticated, start sending and receiving data:

Quickstart

Build your first Speckle integration

Core Concepts

Understand Projects, Models, and Versions
Last modified on July 18, 2026