Skip to content

Use the client credentials flow

Client credentials authentication for server apps

The OAuth 2.0 client credentials flow handles machine-to-machine authentication. It’s designed for backend services and third-party apps that interact with the Tallyfy API without a user logging in.

You’ll need a Client ID and Client Secret from Tallyfy Support before you start.

How the flow works

Diagram

What to notice

  • Step 1 is manual - contacting Tallyfy Support for credentials is a one-time setup you can’t automate
  • Two token types - application tokens (system operations) and user-specific tokens (acting as a particular user)
  • Different lifetimes - application tokens expire in 7 days (604,800 seconds), user-specific tokens expire in 3 months (7,776,000 seconds)

When to use this

This pattern works well when you want to:

  • Embed Tallyfy functionality inside your own software
  • Automate process management or user provisioning
  • Build system-level integrations (reporting, data sync)
  • Provide workflow features to your users without separate Tallyfy logins

Steps

1. Request client credentials

Contact Tallyfy Support with your integration use case. They’ll provide a Client ID and Client Secret for your organization. Store these securely.

2. Get an application access token

Your app first needs its own access token for operations like user provisioning or generating user-specific tokens.

  • Endpoint: POST https://go.tallyfy.com/oauth/token
  • Content-Type: application/x-www-form-urlencoded
  • Parameters:
    • grant_type: client_credentials
    • client_id: Your Client ID
    • client_secret: Your Client Secret
    • scope: * (optional)
const clientId = 'YOUR_CLIENT_ID';
const clientSecret = 'YOUR_CLIENT_SECRET';
const tokenUrl = 'https://go.tallyfy.com/oauth/token';
const params = new URLSearchParams();
params.append('grant_type', 'client_credentials');
params.append('client_id', clientId);
params.append('client_secret', clientSecret);
params.append('scope', '*');
const response = await fetch(tokenUrl, {
method: 'POST',
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
body: params
});
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
const data = await response.json();
console.log('Access token:', data.access_token);
// Use data.access_token for subsequent API calls

Response:

{
"token_type": "Bearer",
"expires_in": 604800,
"access_token": "eyJ0eXAiOiJKV1Q..."
}

3. Provision users (optional)

With your application token, you can create users in your organization:

  • Endpoint: POST https://go.tallyfy.com/api/applications/{orgID}/users
  • Headers:
    • Authorization: Bearer {your_app_access_token}
    • Content-Type: application/json
    • X-Tallyfy-Client: APIClient
  • Body fields:
    • first_name (required): Max 32 characters
    • last_name (required): Max 32 characters
    • email (required): Must be unique, valid domain
    • role (optional): admin, standard, or light
    • timezone (optional): User’s timezone string

4. Get user-specific tokens (optional)

To act as a specific user, generate a user-scoped token with your application token.

  • Endpoint: POST https://go.tallyfy.com/api/applications/{orgID}/users/{email}/token
  • Headers:
    • Authorization: Bearer {your_app_access_token}
    • X-Tallyfy-Client: APIClient
  • Note: No request body needed - the user’s email goes in the URL path.

Response:

{
"token_type": "Bearer",
"expires_in": 7776000,
"access_token": "eyJ0eXAiOiJKV1Q..."
}

5. Make API requests

Use your token (application-level or user-specific) in API calls with these required headers:

  • Authorization: Bearer {token}
  • Accept: application/json
  • X-Tallyfy-Client: APIClient

All API endpoints follow the pattern https://go.tallyfy.com/api/organizations/{orgID}/...

For code examples of specific API operations, see the personal access token guide - the request format is identical, just swap in your token.

Security best practices

  • Store client credentials in encrypted secrets management (never in source code)
  • Protect both application-level and user-specific tokens
  • Rotate secrets periodically
  • Use HTTPS for all requests
  • Re-request application tokens before the 7-day expiry

Open Api > API usage as a third-party application instead of a user

Third-party apps can access Tallyfy’s API through an OAuth 2.0 client credentials flow where the app first obtains an application-level token using a client ID and secret and then exchanges it for user-specific tokens to perform workflow actions on behalf of individual users within a paid organization.

Code Samples > Authentication methods

Tallyfy API authentication requires either a personal access token (from Settings lasting 6 months) or a client credentials OAuth flow (using client ID and secret for 7-day tokens) and every request must include Authorization Bearer token along with Accept and X-Tallyfy-Client headers to work properly.

Integrations > Open API

Tallyfy’s REST API gives developers full programmatic access to the same platform features that power its web app — including process management and task operations and template control and data export — with three authentication methods and standard JSON responses and required headers for every request.

Open Api > API integration guide

Tallyfy’s REST API enables you to connect workflow features to external systems using OAuth 2.0 authentication with required Bearer tokens and X-Tallyfy-Client headers while mapping API terminology like Checklists and Runs to their UI equivalents of Templates and Processes and handling token refresh and multi-organization context for reliable integrations.