Search in docs

Results ..

No results for ''
Search by Algolia

Authentication

To use the API, you need to be authenticated. Two authentication methods are available:

  • Basic authentication

  • JSON Web Token

Basic Authentication

When browsing the API on https://api.bleemeo.com/v1/ unless you enter credentials a popup will ask for your credentials for basic authentication.

JSON Web Token

To generate a token you need to authenticate with your username and password to /v1/jwt-auth/ with a POST request :

$ curl -X POST -H "Content-Type: application/json" -d '{"username": "jon.snow@bleemeo.com","password":"WinterIsComing"}' https://api.bleemeo.com/v1/jwt-auth/
{"token":"eyJhbGciOiJeyJhbGciOiJ..."}

The API returns a JSON with a token property that you can use to make authenticated API calls. Example:

$ curl -H 'Accept: application/json' -H "Authorization: JWT <YOUR_TOKEN>" https://api.bleemeo.com/v1/cloud-interface/

The token is valid for a period of 5 minutes. To refresh the token you need to make POST request to /v1/jwt-refresh/ with the current token:

$ curl -X POST -H "Content-Type: application/json" -d '{"token": "<YOUR_TOKEN>"}' https://api.bleemeo.com/v1/jwt-refresh/
{"token":"eytYWlsIjoic2lsdmVyZUBi..."}

You can refresh multiple times the token for a period of seven days after the authentication. After this delay, you will need to re-authenticate.