Discussions
/v2/attendance token scope invalid
23 days ago by Viky
Hi!
I've been trying to generate a valid access token to use the List attendance periods endpoint.
This is my request
curl --request GET \
--url https://api.personio.de/v2/attendance-periods \
--header 'accept: application/json' \
--header 'authorization: Bearer TOKEN'
This is the response I get
{
"personio_trace_id": "f9eddcad-e93c-4d7f-a6b3-76caf2eec677",
"timestamp": "2024-09-18T09:37:58Z",
"errors": [
{
"title": "Insufficient access scope",
"detail": "Client scope insufficient to access resource",
"type": "https://developer.personio.de/v2.0/page/public-api-error-codes#commonforbidden",
"_meta": {}
}
]
}
Unfortunately there is no documentation on which scope I exactly need to access this resource, my token has the "attendances:read" scope, but this doesn't seem to be the correct one. I've also tried "personio:attendances:read", but that seems to be an invalid scope (I just guessed that one, since there's no documentation on it).
Would be a pleasure if you could give me a hint on how to obtain a valid token to work with the v2 attendances API!
All the best
Viky