ValeronDocs

Get started

Authentication

Authenticate every request with an API key that belongs to your organization.

Every request carries an API key in the Authorization header.

http
Authorization: Bearer vk_live_YOUR_KEY

A key belongs to one organization, so you never send an organization header. Valeron reads the organization from the key.

#Create a key

Only the Owner of the organization (or an Individual, who owns their own account) can create, list and revoke keys.

  1. Sign in to the Valeron app and open Settings › Developers.
  2. Create a key: give it a name and pick its scopes.
  3. Copy the key now. It is shown once.

A key looks like vk_live_ followed by 40 random characters. Valeron stores only a hash of it and its first 12 characters (such as vk_live_abcd), which is what the list in Settings shows. If you lose a key, revoke it and create another.

Keep keys on your server. Put them in an environment variable or a secrets manager. Never ship one in browser code, a mobile app or a public repository.

#Who the request acts as

A request made with a key acts as the person who created it, with that person's role. Every rule that applies to that person applies to the key, and the key's scopes narrow it further. History entries name that person, and records written through the API carry the source api.

If the person who created a key stops being the Owner (or the Individual) of the organization, the key stops working and returns 401 api_key_revoked.

#Scopes

Each key has a list of scopes. A route that needs a scope the key does not have returns 403 missing_scope, and the error names the scope. The full access scope is ["*"]. See Scopes for the list.

#What keys cannot do

Keys reach only the public routes in the API reference. Any other route refuses every key with 403 not_available_with_api_key. Keys are managed with a signed-in session only, never with another key, so there is no API route for creating or listing keys.

#Revoke a key

Open Settings › Developers and revoke the key. A revoked key stays in the list so you can see it existed, and it can never be used again. Requests that use it return 401 api_key_revoked.

#Authentication errors

StatusCodeMeaning
401unauthenticatedThe key is missing or Valeron does not know it.
401api_key_revokedThe key was revoked, or its creator is no longer the Owner.
403missing_scopeThe key does not have the scope the route needs.
403not_available_with_api_keyThe route is not part of the public API.

See Errors for the full error shape.