All REST API resource requests require an authorization token to be passed in the Authorization
header.
The besmart.energy system requires two-factor authentication: The app requires two-factor authentication:
-
In the first step, based on the token associated with a given application workspace (
workspace_token
to be downloaded for workspace administrators using the application), you should download a temporary individually generated token (valid for 2 hours).
The endpoint https://api.besmart.energy/api/users/token is used for this. In the POST method the authorization parameters should be passed:{ "login": "login_name", "password": "login_password" }
where in the
X-Auth
header field the workspace tokenworkspace_token
should be passed:X-Auth: workspace_token
A temporary session token will be generated in response:
temporary_session_token
. -
In ordering any other endpoint, the temporary session token generated in step 1 must be entered in the
Authorization
header field:Authorization: Bearer temporary_session_token