Skip to content

Authorization

Two forms of authorization exist for the BatteryDB API:

  • User keys

  • Device keys

At present, both forms may only be generated via the web UI.

User keys

User keys belong to your user and have access to all of the same endpoints and organizations with the same roles that your user does.

User keys are provided as a header of the following form:

"Authorization: User <token>"  # note the "User" prefix

Device keys

Device keys have access to the minimal subset of REST endpoints that EIS devices need to function. Only one Device key may be created for an EIS device at any time.

  • Device data for the current device

  • Test and EIS data that belong to the current device

Device keys are provided as a header of the following form:

"Authorization: Device <token>"  # note the "Device" prefix