API Authentication Process

Factori API empowers developers and businesses to integrate our powerful data services seamlessly into their applications and systems. In this section, we'll provide you with an overview of our API, its functionality, and how to get started using it.

API Authentication

To ensure the security and integrity of data, the Factori API requires authentication before making any API requests. The authentication process involves the following steps:

  1. Request Access: Users or brands interested in accessing the Factori API need to submit a request through the "Developers" section on the Factori website. This request initiates the verification process.
  2. API Portal Access: Upon verification and contract establishment, the user or brand receives a temporary password, along with a user ID and a link to the Factori API portal. These credentials provide access to the API and initiate the authentication process.

Factori API Dashboard

  1. Password Reset: The user or brand must reset the temporary password received during the previous step. This ensures a secure and personalized access experience.
    Below is an example of a reset password request using Postman:
    POST URL: https://api.factori.ai/api/v1.0/reset_password

    Factori API - Postman - Password Reset

    Request Body Schema:

    {  
      "username": "string",  
      "password": "string",  
      "new_password": "string"  
    }
    
  2. Create Temporary Short Token: After resetting the password, the user or brand can log in to the Factori API portal using the newly set credentials (user ID and password) and generate a short-term token. This temporary token is valid for a limited duration of 1 day.
    Below is an example of short token request using Postman:
    POST URL: https://api.factori.ai/api/v1.0/create_short_token

Factori API - Postman - Short term Token Generation

Request Body Schema:

{
  "username": "string",
  "password": "string"
}
  1. Long-Term Token Creation: Using the temporary token obtained in the previous step, the user or brand can create a long-term token. The long-term token extends the validity period for an extended duration, typically 10 days or more, depending on the terms specified in the contract.
    Below is an example of a Long Term Token request using Postman:
    POST URL: https://api.factori.ai/api/v1.0/create_long_token
Factori API - Postman - Long term Token Generation

Request Body Schema:

{
  "temp_token": "string",
  "token_type": "string"
}
  1. Authorization and API Requests: With the long-term token in hand, the user or brand can now authorize API requests. The long-term token serves as a key to authenticate and authorize each API call made by the user or brand.
    Below is an example of an API Authentication request using Postman:
    GET URL: https://api.factori.ai/api/v1.0/consumer/usage

Below is an example of consumer data request made via API using Postman:
GET URL: https://api.factori.ai/api/v1.0/consumer/data

GET Parameters:

KeyTypeValue
input_datastringEmail/Phone/MAID

Note :

  • All hashed/raw emails must be in lowercase, without spaces in between, and in a proper format.
  • All hashed/raw phone numbers must end with +1 and have no hyphen (-).
  • All hashed/raw MAIDs must be in a proper format.

Rate Limits and Usage Model

To ensure fair usage and maintain system stability, the Factori API enforces rate limits and throttling. Currently, the platform supports up to 200 pings per second. It is essential to consider these limits while designing your application and handling high-volume requests.

As per the account, the max limit and usage quota shall be available to review along with Total Hits and Failed Requests.

Error Handling

In cases where an API request encounters an error, the Factori API provides informative error messages and corresponding status codes. The error handling section of the documentation explains the possible error scenarios, their meanings, and recommended approaches for error handling and troubleshooting.


What’s Next

We've organized our documentation into several sections to help you navigate efficiently. Let's dive in!