Authorization via curl
You can get authorize code via curl using password grant type.
Example:
curl "https://api-dev.lifepeaks.dk/token" -d 'client_id={clientId}&client_secret={clientSecret}&grant_type=password&username={apiUserUsername}&password={apiUserPassword}'
FAQ:
Q: I have incorrect credentials. Error is saying "Invalid username and password combination".
A: Ensure values in request are encoded. For testing you can use service like https://www.urlencoder.org/ .
Q: Auth request returns error on my GET request.
A: Auth request is accepting POST requests.
Response example:
{
"access_token": "413cf40b7c3e2f05d329ed3577441c2311366497",
"expires_in": 86400,
"token_type": "Bearer",
"scope": "admin",
"refresh_token": "e01008fda47a4fd2ac17eccb9dcef62187372266"
}