Requesting an access token
How authentication works
The Gold-Vision API uses OAuth 2.0 client credentials — an industry-standard approach designed for server-to-server integrations where there’s no user login involved. You exchange your client ID and secret for a short-lived access token, then include that token in every API request.
What you’ll need
Your API credentials are provided by Gold-Vision when your access is set up:
| Credential | Description |
|---|---|
| Token URL | https://uk.gold-vision.me/connect/token — the same for all installations |
| Client ID | Unique identifier for your integration |
| Client Secret | Your private key — treat this like a password |
| Scope | Provided with your credentials |
Requesting a token
Send a POST request to the token URL with your credentials as form-encoded body parameters:
POST https://uk.gold-vision.me/connect/token
Content-Type: application/x-www-form-urlencoded
grant_type=client_credentials
&client_id=YOUR_CLIENT_ID
&client_secret=YOUR_CLIENT_SECRET
&scope=YOUR_SCOPE
The response
json
{ "access_token": "eyJhbGci...", "token_type": "Bearer", "expires_in": 3600 }Use theaccess_tokenvalue as a Bearer token on every subsequent API request:
Authorization: Bearer eyJhbGci...