Skip to content

Get & use a personal access token

Overview

The primary and simplest way to authenticate with the Tallyfy API is using your personal access_token. This token acts on your behalf, granting the API requests the same permissions you have within the Tallyfy application.

Getting Your Personal Access Token

  1. Log in to your Tallyfy account at https://go.tallyfy.com/.
  2. Navigate to Settings (usually via your profile picture or menu).
  3. Go to the Integrations section.
  4. Select REST API.
  5. Your personal access_token will be displayed here. Copy it securely.

Using Your Token in API Requests

Once you have your token, you need to include it in the Authorization header of every API request you make. The format is Bearer {your_access_token}.

You also need to include two other standard headers:

  • Accept: application/json (Tells the API you expect a JSON response)
  • X-Tallyfy-Client: APIClient (Identifies the request is coming from a custom API client)

Here’s how to add these headers in different languages:

const accessToken = 'YOUR_PERSONAL_ACCESS_TOKEN';
const orgId = 'YOUR_ORGANIZATION_ID';
const apiUrl = `https://go.tallyfy.com/api/organizations/${orgId}/me/tasks`; // Example endpoint
const headers = new Headers();
headers.append('Authorization', `Bearer ${accessToken}`);
headers.append('Accept', 'application/json');
headers.append('X-Tallyfy-Client', 'APIClient');
fetch(apiUrl, {
method: 'GET',
headers: headers
})
.then(response => {
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
return response.json();
})
.then(data => {
console.log(data);
})
.catch(error => {
console.error('Error fetching data:', error);
});

Remember to replace YOUR_PERSONAL_ACCESS_TOKEN and YOUR_ORGANIZATION_ID with your actual values.