# Need some help with Tuya API that requires signature authentication

**URL:** <https://community.homey.app/t/need-some-help-with-tuya-api-that-requires-signature-authentication/66329>\
**Category:** Developers\
**Tags:** devices, flow, homey-pro\
**Created:** [July 21, 2022, 1:26pm UTC](https://community.homey.app/t/need-some-help-with-tuya-api-that-requires-signature-authentication/66329 "2022-07-21T13:26:26Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeroenvano](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jeroenvano/32/721_2.png) [@jeroenvano](https://community.homey.app/u/jeroenvano)\
**Post date:** [July 21, 2022, 1:26pm UTC](https://community.homey.app/t/need-some-help-with-tuya-api-that-requires-signature-authentication/66329/1 "2022-07-21T13:26:26Z")

</div>

Hi all, not sure where to begin but I need some help from the community (you) 😉

I recently bought myself a Tuya light (powered by a led smart controller) that I would like to control with some flow commands in Homey (e.g. power on/off, color, brightness)

The new light is not supported by the already exsiting “Tuya apps” but is able to be controlled by the Tuya API.  
Sending a HTTP post command is what I have done before but Tuya requires authentication through a singnature. Please see [Authentication Method-Tuya IoT Development Platform-Tuya Developer](https://developer.tuya.com/en/docs/iot/authentication-method?id=Ka49gbaxjygox) and [Sign Requests-Tuya IoT Development Platform-Tuya Developer](https://developer.tuya.com/en/docs/iot/singnature?id=Ka43a5mtx1gsc)

I managed to get it working in a Postman environment (guide on [developer.tuya.com](http://developer.tuya.com)) but struggle now to understand how to replicate and build this with Homey.  
I have no developer background, all knowledge that I have build so far is by try on error.  
Acctually I am already proud that I got as far as I am today 😉

My questions to you:

1. is it possible to get the Tuya API’s working with Sign Requests in a flow?
2. does the “Get access\_token with simple mode” need to be build in a Homeyscript before the API is triggered?

Any guidance is welcome,  
Thanks for making the time.

Jeroen

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [July 21, 2022, 3:12pm UTC](https://community.homey.app/t/need-some-help-with-tuya-api-that-requires-signature-authentication/66329/2 "2022-07-21T15:12:52Z")

</div>

> [@\[APP\]\[Pro\] Tuya Cloud - This app allows you to connect Homey to the Tuya cloud](https://community.homey.app/t/app-pro-tuya-cloud/21313/765):
>
> When adding a device is not possible, try using the so called RAW Commands functionality. Howto: -With the flow below, you´ll be able to “listen” to event messages of your devices; In this example a message of the ‘text’ type, which will return text, numeric and yes/no values. So, when you trigger the device you want to control from the Tuya Smart mobile app ([Google store](https://play.google.com/store/apps/details?id=com.tuya.smart&pli=1) / [Apple store](https://apps.apple.com/nl/app/tuya-smart/id1034649547)), or the SmartLife mobile app ([Google store](https://play.google.com/store/apps/details?id=com.tuya.smartlife) / [Apple store](https://apps.apple.com/nl/app/smart-life-smart-living/id1115101477)) or when you just activate a sensor, you’ll catc…

In the opening post is a howto to connect the Tuya Cloud app with the Tuya iot API

---

<div class="post-metadata">

**Author:** ![jeroenvano](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jeroenvano/32/721_2.png) [@jeroenvano](https://community.homey.app/u/jeroenvano)\
**Post date:** [July 21, 2022, 9:15pm UTC](https://community.homey.app/t/need-some-help-with-tuya-api-that-requires-signature-authentication/66329/3 "2022-07-21T21:15:11Z")

</div>

> [@Peter\_Kawa](#):
>
> ning post is a howto to connect the Tuya Cloud app with the Tuya iot API

Thanks @Peter_Kawa I will have a look and give it a try 😉

---

<div class="post-metadata">

**Author:** ![jeroenvano](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jeroenvano/32/721_2.png) [@jeroenvano](https://community.homey.app/u/jeroenvano)\
**Post date:** [July 21, 2022, 9:28pm UTC](https://community.homey.app/t/need-some-help-with-tuya-api-that-requires-signature-authentication/66329/4 "2022-07-21T21:28:22Z")

</div>

I was able to add the light in the experimental version of the app. Switching on/off works and also setting the color. Setting dim level is not yet supported but for now the app is working. Thanks again!

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [July 22, 2022, 1:36am UTC](https://community.homey.app/t/need-some-help-with-tuya-api-that-requires-signature-authentication/66329/5 "2022-07-22T01:36:42Z")

</div>

You’re welcome!  
Two more tricks:

> [@\[APP\]\[Pro\] Tuya Cloud - This app allows you to connect Homey to the Tuya cloud](https://community.homey.app/t/app-pro-tuya-cloud/21313/765):
>
> When adding a device is not possible, try using the so called RAW Commands functionality. Howto: -With the flow below, you´ll be able to “listen” to event messages of your devices; In this example a message of the ‘text’ type, which will return text, numeric and yes/no values. So, when you trigger the device you want to control from the Tuya Smart mobile app ([Google store](https://play.google.com/store/apps/details?id=com.tuya.smart&pli=1) / [Apple store](https://apps.apple.com/nl/app/tuya-smart/id1034649547)), or the SmartLife mobile app ([Google store](https://play.google.com/store/apps/details?id=com.tuya.smartlife) / [Apple store](https://apps.apple.com/nl/app/smart-life-smart-living/id1115101477)) or when you just activate a sensor, you’ll catc…

😉

---

<div class="post-metadata">

**Author:** ![jeroenvano](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jeroenvano/32/721_2.png) [@jeroenvano](https://community.homey.app/u/jeroenvano)\
**Post date:** [July 24, 2022, 9:55am UTC](https://community.homey.app/t/need-some-help-with-tuya-api-that-requires-signature-authentication/66329/6 "2022-07-24T09:55:09Z")

</div>

Thanks, took me a while but am now able to set a color with a dim level. Thanks again for your guidance.
