athombv / homey-web-api-issues

This issue tracker is for Homey Developers using the Web API.
4 stars 1 forks source link

Not possible to connect to notificationManager #50

Closed hive closed 2 months ago

hive commented 9 months ago

After setting the app permission (in app.json) to

"permissions": [
    "homey:manager:api"
  ],

When attempting to connect to the notificationManager homey throws an exception :

HomeyAPIError: Missing Scopes
    at Session.checkScopes (/node_modules/@athombv/homey-core/dist/lib/Session.js:77:13)
    at /node_modules/@athombv/homey-core/dist/lib/ManagerApi.js:359:19
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  statusCode: 403,
  description: null
}
jeroenwienk commented 9 months ago

After setting the app permission (in app.json) to

"permissions": [
    "homey:manager:api"
  ],

When attempting to connect to the notificationManager homey throws an exception :

HomeyAPIError: Missing Scopes
    at Session.checkScopes (/node_modules/@athombv/homey-core/dist/lib/Session.js:77:13)
    at /node_modules/@athombv/homey-core/dist/lib/ManagerApi.js:359:19
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  statusCode: 403,
  description: null
}

Apps are currently not allowed to read/modify notifications with the API. What exactly do you need this for?

hive commented 9 months ago

I am looking for read access for a new app I am creating that audits and logs pushing to (at this time) and ELK stack. But it would also be helpful for a dashboard idea I am doing discovery upon.

hive commented 9 months ago

Would also be cool if I could have alexa speak my notifications as they occur for the alexa app.

hive commented 4 months ago

@jeroenwienk any updates? Is there as scope which can be used to read the notifications from the webapi?

hive commented 4 months ago

I had a quick look at the cloudAPI - (curl) "'https://192-168-4-100.homey.homeylocal.com/api/manager/notifications/notification/" Which is currently returning the notifications, so the cloud has access but we don't locally?

WeeJeWel commented 2 months ago

It's correct that apps don't have access to the notifications endpoint due to privacy reasons.

If you want this, you can apply for the Web API with that scope and host your app externally.