Getting error while calling the Leave Booked and Balance Report API

Getting error while calling the Leave Booked and Balance Report API

Hi,

I get the following error 

{"error":{"code":7213,"message":"The provided OAuth token is invalid."},"uri":"/api/v2/leavetracker/reports/bookedAndBalance"}

The OAuth token is valid as I am using it in other APIs. Can you please let me know why this error occurred?


dat = Map();
dat.put("recordId","67512000000410165");
dat.put("from","01-Jan-2022");
dat.put("to","31-Jan-2022");
dat.put("unit","Day");
respo = invokeurl
[
url :url
type :GET
parameters:dat.toMap()
connection:"people_authorization"
];
info respo;