How to add API Integrations
How to add API Integrations
How to add API Integrations
This guide provides step-by-step instructions for integrating an API into our system.
This guide provides step-by-step instructions for integrating an API into our system.
1. Add Your API Key to the .env File
Store the API key securely by adding it to the .env
file:
Store the API key securely by adding it to the .env
file:
API_KEY=your_api_key_here
2. Define the API Key as a Required Configuration
Ensure the API key is recognized as a required setting in the application.
Add the key to
app/config.py
:
Ensure the API key is recognized as a required setting in the application.
Add the key to
app/config.py
:
... class Env(StrEnum): ... # Required # Some other keys API_KEY=get_env_required(API_KEY) ... ...
b. Include it in app/settings.py
:
b. Include it in app/settings.py
:
... class Settings(BaseSettings): ... # Secrets/Keys # Some other keys api_key: str ... ...
3. Determine How to Use the API
Depending on the API's purpose, choose the appropriate implementation approach:
Depending on the API's purpose, choose the appropriate implementation approach:
Option 1: Use the API as a Function
If the API call is a simple utility, implement it as a function.
See How To Build New Aurora Functions for more details.
Option 2: Use the API as a Service
For more complex integrations, create a dedicated service inside
app/services/
.Create a file or directory inside
app/services/
, depending on complexity.
Option 1: Use the API as a Function
If the API call is a simple utility, implement it as a function.
See How To Build New Aurora Functions for more details.
Option 2: Use the API as a Service
For more complex integrations, create a dedicated service inside
app/services/
.Create a file or directory inside
app/services/
, depending on complexity.
Smarter Conversations Start Here
Smarter Conversations Start Here
Smarter Conversations Start Here
With VoxSuite, you can deliver better customer service while saving time and money. Let Aurora do the heavy lifting, so you can focus on what matters most.
With VoxSuite, you can deliver better customer service while saving time and money. Let Aurora do the heavy lifting, so you can focus on what matters most.
