Authenticaton Bearer Token local web api

Hello,

I am trying to connect to the local web api (http://LOCAL-IP/api/manager/devices/device/) to retrieve some data and I have seen several posts that the api uses “Bearer Token” for authentication.

So first off, is this still the correct way for api authentication after upgrading to v2.0? If so, where can I find my “Bearer Token” ?

Thanks for all help :wink:

use chrome or firefox
goto homey developer site. (https://developer.athom.com/)
goto tools menu on the left


press f12 for developer console in browser
in homey developer click devices in the left menu and look for the second get in the browsers developers screen.
look for headers on the right and authorization in the right middle

there is your bearer (very long string)

2 Likes

Or use these: https://developer.athom.com/api/projects

client secret is not the bearer code
client id your homey id as in https://homey-id.connect.athom.com

Does anyone have an automatic way of retrieving this token?
Or, even better, a way to renew a token?

I’ve been following this tutorial.
The one thing I couldn’t automate (using Node Red currently, flow available, just PM me) is step 2.
He already discussed this in this post on step 2b.

However I was succesfull in receiving my personal refresh token by manually going through step 1-3.
Been using the refresh token for a week in my Node Red flow succesfully.