Use an OAuth 2.0 bearer token to decode VIN's on behalf of other users. Those users will be billed for the VIN's decoded to their account. This is a very rare use case. If you're not sure what Oauth 2.0 is, then use the Decode a VIN API.
This guide covers getting a token and using it to decode your first VIN.
Contact us to get your application UID and application secret. Give us the redirect URI your application will receive authorization codes on.
Send the user whose account will be billed to GET /oauth/authorize.
They sign in to their own account and approve your application:
https://digitalwindowstickers.com/oauth/authorize?client_id=YOUR-UID&redirect_uri=YOUR-REDIRECT-URI&response_type=code
After they approve, we redirect them to your redirect URI with a
code parameter. Exchange that code for the user's bearer token
at POST /oauth/token:
curl --request POST \
--url 'https://digitalwindowstickers.com/oauth/token' \
--data grant_type=authorization_code \
--data code=CODE-FROM-REDIRECT \
--data client_id=YOUR-UID \
--data client_secret=YOUR-SECRET \
--data redirect_uri=YOUR-REDIRECT-URI
The access_token in the response is that user's bearer token.
VINs decoded with it are billed to their account.
Send the token as a bearer token on every request:
curl --request POST \
--url 'https://digitalwindowstickers.com/api/cars?car[vin]=1C6JJTEG0NL173071' \
--header 'accept: application/json' \
--header 'authorization: Bearer YOUR-TOKEN'
The response includes the decoded vehicle and links to its window sticker — see Decode a VIN for the full request and response reference, or try it live from that page.