Hi.
I’m trying to develop a web app that can modify devices. If I call login without any scopes listed it will prompt me during login with the scope “View your Homeys”. However, I cannot find this scope under Web API Clients. This mean I run into a 403-error when trying to write. I’ve also tried the sledge hammer workaround giving my “API-key” all scopes - but it still fails on writing to the device.
Anyone know how to fix this? Is there some mysterious scope that’s only available for official Homey apps?
These are the developer tools logs:
vue.global.js:11401 [Violation] 'click' handler took 1553ms
3.14.8.js:1 PUT https://xyz.homey.athom-prod-euwest1-001.homeypro.net/api/manager/devices/device/xyz/settings 403 (Forbidden)
fetch @ 3.14.8.js:1
call @ 3.14.8.js:1
await in call
__request @ 3.14.8.js:1
value @ 3.14.8.js:1
saveToDevice @ state-editor-api.html?code=xyz&state=random_state_string:684
callWithErrorHandling @ vue.global.js:2495
callWithAsyncErrorHandling @ vue.global.js:2502
invoker @ vue.global.js:11407
state-editor-api.html?code=xyz&state=random_state_string:693 Auto-save failed: HomeyAPIError: Missing Scopes
at Session.checkScopes (file:///node_modules/@athombv/homey-core/dist/lib/Session.mjs:75:19)
at ManagerApi.onRequest (file:///node_modules/@athombv/homey-core/dist/lib/ManagerApi.mjs:200:25)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
saveToDevice @ state-editor-api.html?code=xyz&state=random_state_string:693
await in saveToDevice
callWithErrorHandling @ vue.global.js:2495
callWithAsyncErrorHandling @ vue.global.js:2502
invoker @ vue.global.js:11407
3.14.8.js:1 Fetch failed loading: PUT "https://640714f7cbd8490b8f7c8ce2.homey.athom-prod-euwest1-001.homeypro.net/api/manager/devices/device/xyz/settings".
fetch @ 3.14.8.js:1
call @ 3.14.8.js:1
await in call
__request @ 3.14.8.js:1
value @ 3.14.8.js:1
saveToDevice @ state-editor-api.html?code=xyz&state=random_state_string:684
callWithErrorHandling @ vue.global.js:2495
callWithAsyncErrorHandling @ vue.global.js:2502
invoker @ vue.global.js:11407