Introduction to Refonte.AI API
Data Engine Core Resources
Data Engine Tasks Types
In order to authenticate API calls, Refonte.Ai employs "HTTP Basic Auth". Fonte.All API queries to our platform must include the API key, according to AI. Username and password support is provided via "HTTP Basic Auth". Enter your API key as the value for the basic auth username. There isn't a password, so you should omit it.
Your API keys are conveniently located in your dashboard. Access to your dashboard is gained by either logging in into your existing account or creating a new one signing up. Once you're in, navigate to your profile and select 'API Key' from the drop-down menu.
Have your account admin head over to https://dashboard.refonte-ai.com/settings/team and update your role to be a "Manager" - Only Admins and Managers have access to API Keys for your security.
Test mode and live mode API keys are provided to accounts in order to maximize API exploration. To conduct a live or test API request, simply utilize the corresponding key; there is no "switch" involved.
Requests submitted using credentials for the test mode are not fulfilled by humans, so the test responses are inaccurate. Requests submitted using credentials for live mode are always handled by humans and are subject to a fee.Requests submitted using credentials for the test mode are not fulfilled by humans, so the test responses are inaccurate. Requests submitted using credentials for live mode are always handled by humans and are subject to a fee.
Refonte.Ai's test and live modes are genuinely independent and distinct. You will encounter an error if you attempt to reference a project that you created in the live mode while creating a task in the testing mode.
Below the project list on the left-hand side of the Refonte.Ai AI online application, there is a button to switch between seeing the live and test modes.
If you'd like to authenticate our callbacks, we set a `refonte.ai-callback-auth` HTTP header on each of our callbacks. The value will be equal to your `Live Callback Auth Key` shown on your dashboard. If this header is not set, or it is set incorrectly, the callback is not from Refonte.AI.
The end goal of our authentication is to be able to specify an `Authorization` header on the requests we're making to the Refonte.AI platform.
Let's pretend our Refonte.AI API Key is `live_Refonte_AI_Rocks`.
Basic Auth puts the username and password together separated by a colon so that it looks like this `username:password`. Because Refonte.AI doesn't have a password, the value is going to be simply `username:` (with the trailing colon)
In our example, this value would now be `live_Refonte_AI_Rocks`:
We then need to do a Base64 encoding for this new string. Virtually all programming languages come with a helper function that can convert a string into it's Base64 encoded version.
In our example, our encoded string would now look like `bGl2ZV9TY2FsZVJvY2tzOg==`
The authorization header when using basic auth starts with `Basic`, and then the encoded string.
Following the example, the `Authorization` header on our request would be `Basic bGl2ZV9TY2FsZVJvY2tzOg==`
If you look at a request header in Postman or in our docs, you'll see the encoded version of your API key being set directly in the header.
Languages
Python
import requests
from requests.auth import HTTPBasicAuth
url = "https://api.refonte.com/v1/tasks"
headers = {"Accept": "application/json"}
auth = HTTPBasicAuth('{{ApiKey}}', '') # No password
response = requests.request("GET", url, headers=headers, auth=auth)
print(response.text)
Updated about 2 months ago