Issues Getting logs

I’m having some trouble getting logs for a lock. I have tested on!/SmartlockLog/get_0 as well as manual CURL request. I have a suspicion that I am using the wrong values for the authId, but I am unable to find any values that do work.

I have tried the following ways (substituting the necessary values):
(URL = ' -> had to replace with URL because I can only post 2 links…)

curl -X GET --header ‘Accept: application/json’ ‘URL/SMARTLOCK_ID/log?authId=ACCESS_TOKEN&limit=20’

curl -X GET --header ‘Accept: application/json’ URL/SMARTLOCK_ID/log?authId=AUTH_ID&limit=20’

curl -X GET --header ‘Accept: application/json’ --header ‘Authorization: Bearer ACCESS_TOKEN’ ‘URL/SMARTLOCK_ID/log’

ACCESS_TOKEN = auth bearer
AUTH_ID = authId pulled from URL/smartlock

I am pretty sure I am just using the wrong values at some point, but am unable to find anything regarding this.

Any help will be much appreciated. Thanks.

Sorry, forgot to mention this is the response I am receiving:

“detailMessage”: “Your access token is not authorized”,
“stackTrace”: [],
“suppressedExceptions”: []

The correct format is:

curl -X GET --header 'Accept: application/json' --header 'Authorization: Bearer ACCESS_TOKEN' 

But it sounds like the Web API is working for you in general (as you could get the Smart Lock ID with the same access token)?

Are you sure the API token is not restricted in scopes?

Hi Stephan.

Yes, API is working in general. I don’t have access to the account, so I am checking with my client regarding API token scope restrictions.

This was the case. Thanks.

1 Like