# Logic webrequest not functional

**URL:** <https://community.homey.app/t/logic-webrequest-not-functional/51064>\
**Category:** Questions & Help\
**Created:** [September 1, 2021, 7:08pm UTC](https://community.homey.app/t/logic-webrequest-not-functional/51064 "2021-09-01T19:08:10Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hovhag](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/hovhag/32/34155_2.png) [@Hovhag](https://community.homey.app/u/Hovhag)\
**Post date:** [September 1, 2021, 7:08pm UTC](https://community.homey.app/t/logic-webrequest-not-functional/51064/1 "2021-09-01T19:08:11Z")

</div>

Hi.  
I can not get webrequest to work.

I have a flow according to the picture, a fictitious switch is switched on when the electricity price is low and it is switched off when the price is high, this works. I then use this switch to trigger a new flow that will perform a webrequest, change a status in my ev charger (Zappi from MyEnergi)

If I type the URL in the browser’s address field, the change takes place in the ev charger, but when I trigger the flow, noting happens in my ev charger.

I use Method GET, because I have beeb told that it’s the same as when I enter the url in a web browser?

The address I want to send is: -[https://user:password@s6.myenergi.net/cgi-zappi-mode-Zserial-1-0-0-0000-](https://user:password@s6.myenergi.net/cgi-zappi-mode-Zserial-1-0-0-0000-)  
I have tried both http and https.  
I leave Headers and Body blank.

Anyone have an idea why it does not work?

Here is the api for myenergi. [GitHub - twonk/MyEnergi-App-Api: Investigation of the MyEnergi App](https://github.com/twonk/MyEnergi-App-Api)

 ![Skärmbild 2021-09-01 145225](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/f/9/f9906a6a750f33c5602967a3466bb309ab82d464.png)

---

<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:** [September 2, 2021, 5:48am UTC](https://community.homey.app/t/logic-webrequest-not-functional/51064/2 "2021-09-02T05:48:02Z")

</div>

What happens when you press the “Test” button?

---

<div class="post-metadata">

**Author:** ![Hovhag](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/hovhag/32/34155_2.png) [@Hovhag](https://community.homey.app/u/Hovhag)\
**Post date:** [September 2, 2021, 7:37am UTC](https://community.homey.app/t/logic-webrequest-not-functional/51064/3 "2021-09-02T07:37:16Z")

</div>

I get the green confirmation dot.

 ![IMG_20210902_093638](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/a/0/a091d319ffada17fb8f2cec17c8ccd53e94b96eb.jpeg)

---

<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:** [September 2, 2021, 7:44am UTC](https://community.homey.app/t/logic-webrequest-not-functional/51064/4 "2021-09-02T07:44:51Z")

</div>

Then I would expect it to be working. I assume that opening the exact same URL in a regular browser turns on the correct mode on your Zappi?

---

<div class="post-metadata">

**Author:** ![Hovhag](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/hovhag/32/34155_2.png) [@Hovhag](https://community.homey.app/u/Hovhag)\
**Post date:** [September 2, 2021, 9:23am UTC](https://community.homey.app/t/logic-webrequest-not-functional/51064/5 "2021-09-02T09:23:54Z")

</div>

Yes, if I open the URL in a web browser the Zappi changes status. MyEnergi server returns the following in the browser.

 ![Screenshot_2021-09-02-11-17-23-126_com.android.chrome](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/6/9/698fb348bddd0984c8c2b333da69a4c1227096dc.jpeg)

---

<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:** [September 2, 2021, 12:06pm UTC](https://community.homey.app/t/logic-webrequest-not-functional/51064/6 "2021-09-02T12:06:51Z")

</div>

Do you have a username or password that has “special” characters (`+`, `&`, `%`) that may need to be encoded?

---

<div class="post-metadata">

**Author:** ![Hovhag](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/hovhag/32/34155_2.png) [@Hovhag](https://community.homey.app/u/Hovhag)\
**Post date:** [September 2, 2021, 12:28pm UTC](https://community.homey.app/t/logic-webrequest-not-functional/51064/7 "2021-09-02T12:28:01Z")

</div>

No.

User and pass have no special characters.

---

<div class="post-metadata">

**Author:** ![tlangelaar](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/tlangelaar/32/10980_2.png) [@tlangelaar](https://community.homey.app/u/tlangelaar)\
**Post date:** [September 2, 2021, 6:40pm UTC](https://community.homey.app/t/logic-webrequest-not-functional/51064/8 "2021-09-02T18:40:41Z")

</div>

Are you using the same urk with credentials in the browser? Or do you log in separately there? Could be that the site does not allow this login method.

---

<div class="post-metadata">

**Author:** ![Hovhag](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/hovhag/32/34155_2.png) [@Hovhag](https://community.homey.app/u/Hovhag)\
**Post date:** [September 3, 2021, 4:26am UTC](https://community.homey.app/t/logic-webrequest-not-functional/51064/9 "2021-09-03T04:26:24Z")

</div>

I use the exact sam URL. Both in browser and in the flow. I have tested the URL I a PC I never ever loged in in any homey or MyEnergi related sites, and I even used the browser in incognito mode.

---

<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:** [September 3, 2021, 5:21am UTC](https://community.homey.app/t/logic-webrequest-not-functional/51064/10 "2021-09-03T05:21:31Z")

</div>

Perhaps the MyEnergi website requires certain headers to be set 🤔

**EDIT** : looking at the response from the MyEnergi website, it looks like it requires Digest authentication instead of Basic. I think that browsers will automatically “upgrade” a connection and retry if the used authentication method isn’t correct, but the Logic card won’t (and it doesn’t support Digest authentication AFAIK).

You’re probably going to have to abandon the hope of getting it working using Logic cards. Perhaps one of the more advanced HTTP apps ([Advanced Rest Client](https://homey.app/a/ch.philippewechsler.rest/) or [HTTP Request flowcards](https://homey.app/a/com.internet/)) can handle Digest authentication.
