Authentication
All API requests are authenticated using a Service Token — a short-lived Bearer token obtained via the OAuth2 Client Credentials grant. This is a machine-to-machine flow: no human login is involved.How it works
Your integration holds aclient_id and client_secret (provided by your DokStamp account manager). Exchange them for an access token, then include that token in every API request.
1. Obtain a token
2. Use the token
Include the token in every subsequent request:3. Token renewal
Tokens expire after 12 hours. There is no refresh token — request a new one with your credentials when needed. Recommended pattern: cache the token and renew proactively ~60 seconds before expiry.Public endpoints
These endpoints do not require authentication:Store
client_id and client_secret in environment variables or a secrets manager. Never commit them to source code.