Skip to main content

API Tokens

Generate and manage API tokens for server-side operations within a specific workspace.


What are API Tokens?

API tokens allow your server-side code to authenticate with a specific workspace to:

  • Authenticate API requests
  • Register new users via the API
  • Perform management operations without OAuth flows

Viewing Tokens

  1. Go to syauth.com/dashboard
  2. Select a Workspace
  3. Click Tokens in the sidebar
  4. View your API tokens for that workspace

Creating a Token

  1. Click Create Token
  2. Configure the token:
FieldDescriptionRequired
NameToken identifier (e.g., production-api)
ScopePermissions (default: read write)
  1. Click Create Token
  2. Important: Copy the token immediately - it's shown only once!

Using API Tokens

API tokens are used to authenticate your application when registering new users:

curl -X POST https://api.syauth.com/e/v1/register/ \
-H "X-API-Key: your_token_here" \
-H "Content-Type: application/json" \
-d '{"email": "[email protected]", "password": "SecurePass123!"}'

Note: API tokens are for Application API endpoints (like registration), not for the Developer Management API. Developer endpoints are only accessible via the SyAuth Dashboard.


Token Scopes

ScopeDescription
readRead-only access to resources
writeCreate and update resources
(empty)Full access to all operations

Example scope values:

  • read - Read-only token
  • write - Create/update only
  • read write - Both read and write access
  • (leave empty) - Full access

Token Security

PracticeDescription
Never expose in frontendTokens are for server-side only
Use environment variablesDon't hardcode tokens
Rotate regularlyCreate new tokens periodically
Revoke unused tokensDelete tokens no longer needed

Revoking a Token

  1. Find the token in the list
  2. Click Delete
  3. Confirm deletion

Note: Revocation is immediate. Any requests using this token will fail.


Token Details

The token list shows:

ColumnDescription
NameToken identifier
ScopePermissions (read, write, or empty for full access)
CreatedWhen the token was created
Last UsedLast time the token was used (or "Never")
StatusActive or Revoked

Best Practices

PracticeDescription
One token per serviceEasier to revoke if compromised
Descriptive namesproduction-api, ci-cd-pipeline
Monitor usageReview last-used dates

Next Steps