# Cannot get permission to run insights.deleteLog() from within an app

**URL:** <https://community.homey.app/t/cannot-get-permission-to-run-insights-deletelog-from-within-an-app/67284>\
**Category:** Questions & Help\
**Tags:** insights\
**Created:** [August 13, 2022, 1:16am UTC](https://community.homey.app/t/cannot-get-permission-to-run-insights-deletelog-from-within-an-app/67284 "2022-08-13T01:16:55Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![frodeheg](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/frodeheg/32/49010_2.png) [@frodeheg](https://community.homey.app/u/frodeheg)\
**Post date:** [August 13, 2022, 1:16am UTC](https://community.homey.app/t/cannot-get-permission-to-run-insights-deletelog-from-within-an-app/67284/1 "2022-08-13T01:16:55Z")

</div>

Apparently, the only possible way to call insights.deleteLog() without getting permission denied seems to be from the web API playground.  
I do have permission “homey:manager:api” set

Is this a bug?

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [August 13, 2022, 6:23am UTC](https://community.homey.app/t/cannot-get-permission-to-run-insights-deletelog-from-within-an-app/67284/2 "2022-08-13T06:23:31Z")

</div>

Either apps aren’t allowed to manage insights logs, or it needs another (undocumented) permission (try `homey:manager:insights`).

---

<div class="post-metadata">

**Author:** ![frodeheg](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/frodeheg/32/49010_2.png) [@frodeheg](https://community.homey.app/u/frodeheg)\
**Post date:** [August 13, 2022, 11:04am UTC](https://community.homey.app/t/cannot-get-permission-to-run-insights-deletelog-from-within-an-app/67284/3 "2022-08-13T11:04:43Z")

</div>

Yupp, but that gives me:

```auto
✖ App did not validate against level `debug`:
Invalid permission: homey:manager:insights

```

If the case is that apps are not allowed to manage insights logs then what is the point of making an API for it? Using the web API playground to delete corrupted logs is so un-intuitive that I doubt the average homey user will ever use it. Instead, they will blame the app and complain that the app has a corrupted data log.

I can understand that they would want to stop a malicious app from deleting all logs but preventing an app from deleting its own logs seems way too restricted to me.

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [August 13, 2022, 1:24pm UTC](https://community.homey.app/t/cannot-get-permission-to-run-insights-deletelog-from-within-an-app/67284/4 "2022-08-13T13:24:30Z")

</div>

> [@frodeheg](#):
>
> If the case is that apps are not allowed to manage insights logs then what is the point of making an API for it?

The Homey (web) app needs it to remove Insights logs.

---

<div class="post-metadata">

**Author:** ![frodeheg](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/frodeheg/32/49010_2.png) [@frodeheg](https://community.homey.app/u/frodeheg)\
**Post date:** [August 13, 2022, 10:11pm UTC](https://community.homey.app/t/cannot-get-permission-to-run-insights-deletelog-from-within-an-app/67284/5 "2022-08-13T22:11:38Z")

</div>

Which brings me back to “is this a bug?”

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [August 14, 2022, 5:56am UTC](https://community.homey.app/t/cannot-get-permission-to-run-insights-deletelog-from-within-an-app/67284/6 "2022-08-14T05:56:17Z")

</div>

Obviously, if you want a definitive answer, you’d have to ask Athom, not the community.

My guess is that it’s intentional, Athom typically regards community developers as untrustworthy.
