# HTTP POST card with authentication and lot's of confusion

**URL:** <https://community.homey.app/t/http-post-card-with-authentication-and-lots-of-confusion/59657>\
**Category:** Questions & Help\
**Created:** [February 3, 2022, 9:58am UTC](https://community.homey.app/t/http-post-card-with-authentication-and-lots-of-confusion/59657 "2022-02-03T09:58:35Z")\
**Posts on this page:** 9\
**Page:** 2

<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:** [February 9, 2022, 2:14pm UTC](https://community.homey.app/t/http-post-card-with-authentication-and-lots-of-confusion/59657/21 "2022-02-09T14:14:58Z")

</div>

> [@Martijn\_Hoogenbosch](#):
>
> Can’t it be the formatting? I’m seeing / signs in the YARC code?

(assuming you mean `\`)

Those are escape characters because the entire string is already surrounded by double quotes.

FWIW, in your initial post it looks like you might have changed the name of the device to `iphonevnMartjin`

---

<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:** [February 9, 2022, 2:32pm UTC](https://community.homey.app/t/http-post-card-with-authentication-and-lots-of-confusion/59657/22 "2022-02-09T14:32:58Z")

</div>

> [@robertklep](#):
>
> iphonevnMartjin

Wow, sharp! ji instead of ij…

---

<div class="post-metadata">

**Author:** ![Martijn\_Hoogenbosch](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/martijn_hoogenbosch/32/10647_2.png) [@Martijn\_Hoogenbosch](https://community.homey.app/u/Martijn_Hoogenbosch)\
**Post date:** [February 9, 2022, 3:24pm UTC](https://community.homey.app/t/http-post-card-with-authentication-and-lots-of-confusion/59657/23 "2022-02-09T15:24:20Z")

</div>

Razer sharp! nice catch. unfortunately this was merely a typo in the first post. I’m done with this. Don’t think it can be done. Don’t understand why YARC does work and CURL / Homey doesn’t

Even doing it plain text i’m still getting ‘forbidden’…

Going with normal browser to [http://192.168.20.69/control/clients/delete](http://192.168.20.69/control/clients/delete) i’m getting a forbidden too.

---

<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:** [February 9, 2022, 3:35pm UTC](https://community.homey.app/t/http-post-card-with-authentication-and-lots-of-confusion/59657/24 "2022-02-09T15:35:07Z")

</div>

> [@Martijn\_Hoogenbosch](#):
>
> Going with normal browser to [http://192.168.20.69/control/clients/delete](http://192.168.20.69/control/clients/delete) i’m getting a forbidden too.

That is expected, it needs to be a POST request.

---

<div class="post-metadata">

**Author:** ![Martijn\_Hoogenbosch](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/martijn_hoogenbosch/32/10647_2.png) [@Martijn\_Hoogenbosch](https://community.homey.app/u/Martijn_Hoogenbosch)\
**Post date:** [February 9, 2022, 3:36pm UTC](https://community.homey.app/t/http-post-card-with-authentication-and-lots-of-confusion/59657/25 "2022-02-09T15:36:14Z")

</div>

Was afraid of that… tnx for you help non the less!

---

<div class="post-metadata">

**Author:** ![Martijn\_Hoogenbosch](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/martijn_hoogenbosch/32/10647_2.png) [@Martijn\_Hoogenbosch](https://community.homey.app/u/Martijn_Hoogenbosch)\
**Post date:** [February 12, 2022, 8:05pm UTC](https://community.homey.app/t/http-post-card-with-authentication-and-lots-of-confusion/59657/26 "2022-02-12T20:05:43Z")

</div>

I can’t seem to let it go. Apparently CURL is now a default package on Windows 10 and 11 too. Didn’t know that.

When I send the command:

curl --verbose --http1.1 -H “Content-Type:application/json” -d @json-add.txt [https://user:pass@adguard.hoogenbosch.cloud/control/clients/add](https://user:pass@adguard.hoogenbosch.cloud/control/clients/add)

with

```auto
  {
  	"name": "iphonevnMartijn",
  	"ids": ["192.168.20.125"],
  	"tags": ["user_child"],
  	"upstreams": [],
  	"filtering_enabled": true,
  	"parental_enabled": false,
  	"safebrowsing_enabled": false,
  	"safesearch_enabled": false,
  	"use_global_blocked_services": false,
  	"use_global_settings": false,
  	"blocked_services": ["tiktok", "amazon", "dailymotion", "discord", "disneyplus", "ebay"]
  }

```

in the .txt file, it works from my laptop device.

From Homey it says, unexpected end of JSON file

> > EHHHHHH … even though it presents this error… it does the job… it deletes and adds…

---

<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:** [February 12, 2022, 8:43pm UTC](https://community.homey.app/t/http-post-card-with-authentication-and-lots-of-confusion/59657/27 "2022-02-12T20:43:06Z")

</div>

Mooi dat het werkt, Martijn!

> [@Martijn\_Hoogenbosch](#):
>
> unexpected end of JSON file

even een lekkere flauwe grap toe:

```auto
...
  	"use_global_settings": false,
  	"blocked_services": ["tiktok", "amazon", "dailymotion", "discord", "disneyplus", "ebay"],
    "here_it_ends_JSON!!": true
  }

```

---

<div class="post-metadata">

**Author:** ![Martijn\_Hoogenbosch](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/martijn_hoogenbosch/32/10647_2.png) [@Martijn\_Hoogenbosch](https://community.homey.app/u/Martijn_Hoogenbosch)\
**Post date:** [February 12, 2022, 8:45pm UTC](https://community.homey.app/t/http-post-card-with-authentication-and-lots-of-confusion/59657/28 "2022-02-12T20:45:52Z")

</div>

oh well… … that makes it expected, right? 🤣 🤨

---

<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:** [February 12, 2022, 11:47pm UTC](https://community.homey.app/t/http-post-card-with-authentication-and-lots-of-confusion/59657/29 "2022-02-12T23:47:41Z")

</div>

Yea!! Keep it simple hehe

[Previous page](https://community.homey.app/t/http-post-card-with-authentication-and-lots-of-confusion/59657.md?page=1)
