Generate an API Key
This page provides specific information about generating an API Key for a company. The process can be done through an API request or the Platform interface.
Generate with an API request
To generate the Key API through the Astara Connect API service, you need the value of the company_oid to launch the request.
To get the company_oid, you need to launch the following sequence:
1._ Log in as a user endpoint with your email and password values to get a JWT (JSON Web Token) access token string. This token will expire after 8 hours.
Body example for the request:
{
"email": "[email protected]",
"password": "xxxxxxxxxxxx"
}
2._ Then, with the JWT generated, launch the endpoint to get the user data, where you will find the related information, such as their associated companies and permissions. Check for detailed information.
3._ To complete the process of generating an API Key for a company, you need to launch the endpoint of creating an API Key by adding the company_oid
as in the following example:
{
"company_oid": "2XX443n5n3sdfn345n72564095n"
}
The company API key is unique.
By default, is not generated because it authenticates the Company via API.
Generate in the Platform interface
To start creating products and services with the Astara Connect capabilities, you will need to create an API Key of the Company, following these steps in the platform:
- To access the platform, go to Settings | Company.
- Click the GENERATE API KEY button, then Confirm and generate. If it's not the first time, remember that once it's generated, the previous API Key will no longer be available, so any use or call will report an authentication error.
- After it is confirmed, the API KEY will appear on-screen. Copy and save it safely; you can only see it while the modal window is open.
You can start using the API endpoints with the Company's API Key.
If you have any questions, please contact us at [email protected].
Updated 8 months ago