Skip to main content

Prerequisites

The VEDA API uses the OAuth 2.0 protocol to authenticate requests. To start using the API, you need a Client ID and Secret. A valid access token is essential for authenticating your requests and ensuring secure access to the API. To obtain these credentials, please contact our support team. They can also assist you if you need to regenerate your key or have any questions about the API.

Getting an Access Token

Once you have received your Client ID and Secret, you can request a bearer access token. To do this, you need to make a request to the token endpoint (/oauth2/token) using your client ID and secret:
curl --request POST \
  --url https://your-environment.cloud.veda.net/api/oauth2/token \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data 'grant_type=client_credentials&client_id=<your_client_id>&client_secret=<your_client_secret>'
The response contains the access token that you will use in the Authorization header of your API requests. Here’s an example of what the response might look like:
{
  "access_token": "your_access_token",
  "token_type": "Bearer",
  "expires_in": 3600
}

Making Your First Request

Now that you have your access token, you can make your first request. The API Gateway uses a bearer token for authentication, so you must include your API key in the Authorization header of each request. Here’s a simple example using cURL:
curl --request GET \
  --url https://your-environment.cloud.veda.net/api/v1/status \
  --header 'Bearer: <access_token>'
Hint: This endpoint doesn’t actually exist. I’m writing this before any endpoints have been created. Please remind me that I forgot this here.