Follow the steps below to generate a token and send your first request to the Viously API.
Pre-requisite
Make sure you have your API key and API secret.
You can follow the procedure described in the Overview section to retrieve them.
Generate an access token
Authenticate against the /authentication endpoint with Basic Auth (API Key + API Secret encoded in Base64).
A successful call returns a short‑lived Bearer token you will pass on every subsequent request.
# Replace {API_KEY}:{API_SECRET} with your own values
curl -X POST https://api.viously.com/v2/authentication \
-H "Authorization: Basic $(echo -n '{API_KEY}:{API_SECRET}' | base64)"
Successful response (HTTP 200):
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
The token expires after one hour.
Refresh it before expiration by calling /authentication again.
Save token
; you’ll use it like:
Authorization: Bearer <token>
Make your first call
curl https://api.viously.com/v2/analytic/dashboard/revenue/net-revenues \
-H "Authorization: Bearer <token>"
Example response (JSON‑LD):
{
"aggregate": {
"net_revenue": 123.45678
},
"hydra:member": [
{
"net_revenue": 123.45678,
"date": "2022-10-10T00:00:00+00:00"
}
],
"hydra:totalItems": 1,
"metadata": {
"timezone": "UTC"
},
"queriedAt": "2025-04-10T00:00:00+00:00"
}