Skip to main content

Install

Prerequisites

  • Future AI API Key
  • Node.js environment
  • Access to Future AI services

API key & SDK configuration

To get started, you need to login to your account on FutureAI and create a new Api key. You will get an API key, and the necesery config to authenticate your requests.

Quickstart

Configuration Options

Authentication flow

1. Initial connection

2. Google OAuth2 Authentication

3. User Authentication

4. Email Analysis Results

Future Button Implementation

Adding the Button

Error Handling

Error Response Cases

Invalid API Key

Missing API Key

Invalid Authentication Token

Internal Server Error

Implementation Example

Results Structure

Best Practices

  1. Always handle session updates through the onSessionUpdate callback
  2. Implement proper error handling using the onError callback
  3. Store and manage user tokens appropriately
  4. Handle reconnection scenarios
  5. Validate configuration before initializing
  6. Implement proper cleanup on errors