Skip to content
English
  • There are no suggestions because the search field is empty.

How Does Our API Authentications Work?

Our API uses OAuth for authentication via the client credentials flow, issuing bearer tokens that expire every 10 minutes for enhanced security and compliance.

Contents



How does Firefish API authentication work?


Clients access our API using OAuth, specifically the client credentials flow. By requesting bearer tokens, applications can securely interact with the API. You can share tokens without revealing the underlying credentials.


Why do bearer tokens expire?

Bearer tokens allow for secure transmission between systems or users without exposing sensitive login information. However, like API keys and passwords tokens carry a degree of risk, such as leaks and theft. Attackers can exploit leaked tokens. To mitigate risks, tokens expire every 10 minutes.


How does Firefish manage token expiry?

Firefish enforces short token lifetimes to prevent stale tokens from posing security risks. This reduces the chance of unauthorized access and supports compliance with applicable data protection regulations.

To handle token expiry in your integration, follow these steps:

  1. Request a new token before each API session, or when a 401 Unauthorized response is returned, using the client credentials flow with your client ID and client secret.
  2. Store the token temporarily in memory or a secure session store — do not persist it to disk or logs, as tokens are short-lived and sensitive.
  3. Check the token's expiry before making subsequent requests. Refer to the developer documentation for the current token lifetime, and re-authenticate proactively if your workflow may span that window.
  4. Implement retry logic in your application to automatically request a new token and retry the original request if a 401 response is received mid-session.

Managing Tokens for Business Applications

Because Firefish tokens have a short expiry window, it is important to plan a token management strategy — especially if you are connecting analytics tools like Excel, Power BI, or Tableau. These platforms support API access but typically require custom configuration to handle token refresh. Check the developer documentation for the current token lifetime.


Options for Managing Tokens

  1. Building a Custom Application
    Using OAuth and REST APIs, you can integrate Firefish data into custom applications like websites or mobile apps. This is ideal for bespoke solutions tailored to your workflow.
  2. Extending Your Analytics Tool
    Analytics platforms like PowerBI and Excel provide SDKs or scripting languages to build connectors for managing token access. This is a great option for teams with development expertise.
  3. Building a Data Warehouse Integration
    If your team has IT and analytics expertise, consider creating a data orchestration tool or application to import data into an intermediate source. This approach centralizes data management and ensures analysts do not need coding knowledge.

No matter the approach, consider the security requirements of your application. OAuth is a versatile authentication method that supports integration with multiple platforms, making it ideal for a wide range of solutions.