# How do I use Homey.flow.updateFlow() in a homeyscript

**URL:** <https://community.homey.app/t/how-do-i-use-homey-flow-updateflow-in-a-homeyscript/42003>\
**Category:** Questions & Help\
**Tags:** homeyscript, flow\
**Created:** [January 29, 2021, 2:35pm UTC](https://community.homey.app/t/how-do-i-use-homey-flow-updateflow-in-a-homeyscript/42003 "2021-01-29T14:35:36Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Dijker](https://avatars.discourse-cdn.com/v4/letter/d/b9bd4f/32.png) [@Dijker](https://community.homey.app/u/Dijker)\
**Post date:** [January 29, 2021, 4:12pm UTC](https://community.homey.app/t/how-do-i-use-homey-flow-updateflow-in-a-homeyscript/42003/3 "2021-01-29T16:12:30Z")

</div>

This was possible before Homey 2.0  
even with the correct code you can’t as HomeyScript has not the correct Permission in Homey \>= v2.0:

You need:  
**Required OAuth scopes:**

- homey.flow

but only have Readonly as stated in [HomeyScript scopes / authorization](https://community.homey.app/t/homeyscript-scopes-authorization/21513)

o, and BTW: You can from the Web API Playground, and see teh Disable/enable all Apps fe.

> [@Developer Web API Playground - Notes of geeky oneliners](https://community.homey.app/t/developer-web-api-playground-notes-of-geeky-oneliners/24392/1):
>
> ```auto
> // Search for disabled flows: by Le_Cactus
> Homey.flow.getFlows().then(f => Object.values(f).reduce((r,b)=>Object.assign(r, {[b.name]:b.enabled}), {}));
> 
> ```

---

_[View the full topic](https://community.homey.app/t/how-do-i-use-homey-flow-updateflow-in-a-homeyscript/42003)._
