API Client Registration
data_reader, org_global_admin, or org_owner
About API Client Registration
This tab allows a user to create an API Client Registration which will allow access to any of the Platform APIs.
An API Client Registration allows your client application (such as a script or bot) to interact securely with Vega Platform APIs and services by registering it with the Vega Authentication System. This registration assigns a unique identity to your application, functioning like a digital badge that authenticates your application's requests to Vega services. Your application is secured via a Client Secret Key, a confidential key that verifies your application's identity when accessing Vega resources. Treat this Client Secret Key as a sensitive piece of information, ensuring that only your application has the access needed to communicate with Vega services securely.
Generate an API Client Registration
In order to generate an API Client Registration, click the "+ API Client Registration" button:
Enter a name for the client registration, as well as an expiration time, and click the Save button:
Expiration can be set to 1 day, 1 week, 30 days, 90 days, 120 days, 1 year, or 2 years.
Once the client registration is created, ensure that you save the Client ID and Client Secret Key, as the secret will not be shown again. You can copy and/or download as a JSON file for safe keeping.
Acknowledge that you have copied the client information by checking the "I have copied the client information" box, then click the Done button.
All saved API Client Registrations will be shown in the table, listing details for each client registration. There is a limit of 5 client registrations per user. You can delete inactive client registrations by clicking the delete icon in the 'Actions' column.
How to use an API Client Registration
Once you have generated a Client Registration for your application, send the Client ID and Client Secret Key to the following endpoint in order to return an access token:
curl -X POST 'https://auth.vegacloud.io/realms/<your-realm-name>/protocol/openid-connect/token' \
-H 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'client_id=<your-client-id>' \
--data-urlencode 'client_secret=<your-client-secret>'
Then, send the access token as the Authorization: Bearer
header when calling a Platform API endpoint:
curl -X GET 'https://api.example.com/protected/resource' \
-H 'Authorization: Bearer <your_access_token>'