You are here
I'm using the Turnkey orangeHRM image in AWS. I need to be able to use the API to retrieve an employee's ID and details, but can't seem to get this to work.
The API documentation seems a little sparse and although I've managed to setup the auth token, I cannot use a bearer token to login and get details back.
So is the API fully functional in this image (ie. can I do what I need to?), and,
Is there a curl or other example of how to make a POST/PUT call?
$ curl -s -XPOST "https://orangehrm-elb.bangonabout.com/symfony/web/api/getEmployee/employ... --header "Content-Type:application/x-www-form-urlencoded" --header "Authorization: Bearer {"access_token": "81811710cf1a93e8e42175f7471fcbe9c41b1e9f"}" | python -m json.tool
{
"error": "invalid_grant",
"error_description": "The access token provided is invalid"
}
keeps coming back, but I suspect either the API won't accept this or my bearer header syntax is wrong?
Anyone able to help?
Thanks
Phil.
Hi Phil
So I see a few possibilities:
My suggestion would be to update to the latest stable upstream version (3.3.3) and see how things go then. If it still doesn't work as it should, then I suggest that you post on their forums and hopefully someone can help you get it working properly.
If you think that it's likely a bug (regardless of who is at fault) please post an issue on our tracker. Bonus points if you can discover a resolution or workaround!
Add new comment