Skip to main content
This page walks you through a complete first request to the Core API, from API key to a real resource call.

API Key

To Use the Core API you require an API key. The API key can be created in the chargecloud OS. An API Key consists of:
  • Public key, used as the username
  • Private key, used as the password
Treat the private key like a password. Do not share it, do not commit it to Git, and store it in a secrets manager or environment variables.

Get an access token

Before you can call protected endpoints, you first need an OAuth access token.

Request

Response

Copy the access_token value and send it with each request using the Authorization header:
  • Authorization: Bearer <access_token>

List locations

With a valid access token, you can call the Asset endpoints. The example below fetches all locations.

Request

Response

You have successfully completed your first Core API call.