Read the account that owns the API key.
Send the key as a Bearer token in the Authorization header.
Requests without a valid key return 401 Unauthorized.
Plans without API access return 403 Forbidden.
curl --location --request GET 'https://www.dashboard.datablik.com/api/v1/account' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'
const response = await fetch('https://www.dashboard.datablik.com/api/v1/account', {
method: 'GET',
headers: {
'Accept': 'application/json',
'Authorization': 'Bearer {api_key}'
}
});
const data = await response.json();
<?php
$curl = curl_init('https://www.dashboard.datablik.com/api/v1/account');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Accept: application/json',
'Authorization: Bearer {api_key}',
],
]);
$data = json_decode(curl_exec($curl), true);
curl_close($curl);