APIs
Authentication

Authentication

API tokens

Authorization for the Lightbug APIs make use of Bearer tokens generated via one of the following methods:

Both token versions are supported in both API versions.

You can find code examples in many languages in each API specification page (linked above).

V2 curl example

An example curl request to log in with the v2/users/login endpoint would be:

curl --request POST \
  --url https://api.lightbug.cloud/v2/users/login \
  --data '{ "username": "example@demo.com", "password": "someSecurePassword" }'

In all further authenticated API calls, the generated token must be submitted in the Authorization header of the request:

curl -X GET "https://api.lightbug.cloud/apiEndpoint" -H "Authorization: someTokenValueHere"'

Lightbug Documentation