Generic-Rest-API
Overview
The Generic REST API integration allows autobotAI to interact with any third-party service that exposes a REST API. This integration supports various authentication methods, enabling you to connect to a wide range of APIs, such as those requiring no authentication, Bearer tokens, Basic Authentication, or API Keys.
Prerequisites
Before you begin, ensure you have the following:
- API URL: The base URL of the API you want to connect to.
- Authentication Credentials: Depending on the chosen authentication method, you may need:
- Bearer Token
- Username and Password (for Basic Authentication)
- API Key (along with the API Key Name and Location)
Steps to Set Up Generic-Rest-API Integration
Step 1: Navigate to the Integrations Page
Go to the Integrations page by selecting Integrations from the menu. Then, click + Add Integration in the top-right corner to view available integrations.
Step 2: Select Generic REST API Integration
Under the Others category, select Generic REST API + Add to initiate the integration setup for Generic REST API.
Step 3: Fill in the Required Details
Complete the required fields based on the authentication method for your API:
Note: Fields marked with an asterisk (*) are mandatory.
1. No Authentication:
- Alias: Provide a descriptive name for this integration.
- Groups: Use groups to organize multiple integrations, similar to how labels work in Gmail.
- API URL: Enter the base URL of the API.
2. Bearer Token:
- Alias: Provide a descriptive name for this integration.
- Groups: Use groups to organize multiple integrations, similar to how labels work in Gmail.
- API URL: Enter the base URL of the API.
- Bearer Token: Enter the Bearer Token required for authentication.
3. Basic Authentication:
- Alias: Provide a descriptive name for this integration.
- Groups: Use groups to organize multiple integrations, similar to how labels work in Gmail.
- API URL: Enter the base URL of the API.
- Username: Enter the username for authentication.
- Password: Enter the password for authentication.
4. API Key:
- Alias: Provide a descriptive name for this integration.
- Groups: Use groups to organize multiple integrations, similar to how labels work in Gmail.
- API URL: Enter the base URL of the API.
- API Key Name: Enter the name of the API key.
- API Key Value: Enter the value of the API key.
- API Key Location: Specify where the API key is located (e.g., Header, Query Parameter).
Once you've entered the necessary information, click Create to finalize the integration setup.
Step 4: Test the Integration
After completing the setup, go to the Integrations page and locate your newly created Generic REST API integration. Click on the three dots next to it and select Test to ensure your API is successfully connected to autobotAI.
Additional Information
How to Obtain the Required API Keys and Credentials
Depending on the authentication method, here are steps to obtain the necessary credentials:
1. No Authentication:
This method requires no credentials. You only need the API URL to connect to the service.
2. Bearer Token:
To obtain a Bearer Token, you may need to:
- Register your application with the service provider to receive a client ID and client secret.
- Use OAuth2 or similar protocols to retrieve the token via the service’s authentication endpoint.
3. Basic Authentication:
For Basic Authentication, you will need:
- Username and Password: These are typically provided when registering for the API service or can be found in the API documentation or user settings.
4. API Key:
To obtain an API Key, follow these general steps:
- Go to the API provider’s developer portal or settings page.
- Register your application or request an API key.
- Find the API Key Name, API Key Value, and decide on the API Key Location (usually in the header or as a query parameter).
Check the provider's documentation for specific instructions on retrieving the API key.