Hi there,
I’ve generated a bearer token and am sending the following request:
GET /v1/live/hazards/roadwork/open HTTP/1.1
Host: api.transport.nsw.gov.au
Authorization: Bearer f…
Cache-Control: no-cache
Here is the response I receive:
{
"ErrorDetails": {
"TransactionId": "00000154124922b7-b38f",
"ErrorDateTime": "2016-04-18T12:23:32.609+10:00",
"Message": "The calling application is unauthenticated.",
"RequestedUrl": "/v1/live/hazards/roadwork/open",
"RequestMethod": "GET"
}
}
For complete clarity, I’m sending the GET request to https://api.transport.nsw.gov.au/v1/live/hazards/roadwork/open with the bearer token in the authorization header (i.e. no additional query strings in the URL). I’ve assigned the ‘Roads - Realtime - Hazards’ API to my application, so at this point I’m not sure what I’m doing wrong.
Any ideas?
(Edit: I know I can get the roadwork hazards file at this URL but I’m getting this error for ALL services (e.g. realtime transport) so that’s not a solution.)