OAuth-Token
Endpunkte für die Ressource OAuth-Token. Alle Aufrufe erfordern Authentifizierung und liefern die Standard-JSON-Envelope.
🔗
Basis-URL: https://companybelgium.be/api · Authentifizierung
Obtain an access token#
POST/oauth/token
OAuth2 client_credentials grant for developer applications. Returns a bearer token usable as an alternative to the X-API-Key / X-API-Secret headers.
Body (Form)
grant_type=client_credentials
client_id=app_xxx
client_secret=secret_xxxAnfrage
curl -X POST https://companybelgium.be/api/oauth/token \
-H "Content-Type: application/x-www-form-urlencoded" \
-d grant_type=client_credentials \
-d client_id=app_xxx \
-d client_secret=secret_xxxconst res = await fetch("https://companybelgium.be/api/oauth/token", {
method: "POST",
headers: { "Content-Type": "application/x-www-form-urlencoded" },
body: new URLSearchParams({"grant_type":"client_credentials","client_id":"app_xxx","client_secret":"secret_xxx"}),
});
const { data } = await res.json();Antwort
{
"success": true,
"data": {
"access_token": "eyJhbGciOi...redacted",
"token_type": "Bearer",
"expires_in": 3600
},
"error": null,
"timestamp": "2026-06-05T09:00:00.000Z",
"meta": null
}