Skip to content

Latest commit

 

History

History

connected-vehicle-fetch-sample

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Connected Vehicle API Node Example

About

Minimal example using node on how to get started with Volvo Cars’ Connected Vehicle API.

Read the full API documentation on the Volvo Cars Developer Portal.

Prerequisites

  • node 18 or above.
  • npm 9 or above.

Running Locally

1. Setup your local project

Install dependencies

npm install

2. Setup environment variables

Create an .env file with the following environment variables:

  • VCC_API_KEY - This is your application key. To acquire your application key, visit your account page and create an application.

  • ACCESS_TOKEN - This is an OAuth2 bearer token. To generate a Connected Vehicle API access token, visit the Test access tokens page

NOTE: The access token is short lived and needs to be refreshed every 60 min.

3. Run code

npm run start