You will need the username and password of an active user in your Betterez backend.
We recommend creating an specific user for the API unless you want to track usage by specific users.
Basic Access Authentication token
This endpoint uses Basic Access Authentication to authenticate a User, using username and password.
For example: a User with username user@btrz.com
and password secret1
should send a header Authorization
with the result of Base64 encoding both strings
echo -n "user@btrz.com:secret1" | base64
//dXNlckBidHJ6LmNvbTpzZWNyZXQx
The basicAuthToken in this example would be `dXNlckBidHJ6LmNvbTpzZWNyZXQx`
Login
To login and get the JWT for use in other requests you will perform a POST
into the https://api.betterez.com/accounts/users
The audience
parameter must be completed with the name of the Application that is authenticating the User.
A full request with curl will look like this.
Notice that the data (after --data in curl) is a stringified json object.