# JSON POST with App "Simple HTTP Connector For Flows"

**URL:** <https://community.homey.app/t/json-post-with-app-simple-http-connector-for-flows/16702>\
**Category:** Questions & Help\
**Tags:** app, flow\
**Created:** [August 10, 2019, 7:33pm UTC](https://community.homey.app/t/json-post-with-app-simple-http-connector-for-flows/16702 "2019-08-10T19:33:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jonas\_Almquist](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jonas_almquist/32/12975_2.png) [@Jonas\_Almquist](https://community.homey.app/u/Jonas_Almquist)\
**Post date:** [August 10, 2019, 7:33pm UTC](https://community.homey.app/t/json-post-with-app-simple-http-connector-for-flows/16702/1 "2019-08-10T19:33:02Z")

</div>

Hi,

I am trying to to use a HTTP Request app to make a JSON POST.

I am able to get it working in a software called Fiddler Webdebugger and there it looks like this:

 ![Fiddler](https://us1.discourse-cdn.com/flex025/uploads/athom/original/2X/9/98c7393a56c1932bc9471594e6e6f5fa8676fdba.png)

I create a HTTP Request flow card POST JSON  
and put this in the first textbox at top: [http://192.168.1.141:8123/api/services/light/turn\_on](http://192.168.1.141:8123/api/services/light/turn_on)

and in the second box i put:

{  
“authorization”: “Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9……….”,  
“content-type”: “application/json”,  
“host”: “192.168.1.141:8123”,  
“Content-Length”: “62”,  
“entity\_id”: “light.hall\_uppe\_tak”,  
“brightness”: “0”  
}

But when i test it in Homey i get an error: “Unexpected token: in JSON at position 3”

Does anyone know what i am doing wrong?

Best Regards Jonas

---

<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 11, 2019, 6:49am UTC](https://community.homey.app/t/json-post-with-app-simple-http-connector-for-flows/16702/2 "2019-08-11T06:49:56Z")

</div>

If that is literally the JSON that you’re trying to post, the issue is with the fancy quote characters that it contains (`“` and `”`). Those should be plain quote characters (`"`).

But that won’t fix your problem, because you’re also mixing headers and data, which is not how the HTTP app works.

You need to put this in the first box:

```auto
{
  "method": "post",
  "protocol": "http",
  "hostname": "192.168.1.141",
  "port": 8123,
  "path": "/api/services/light/turn_on",
  "headers": {
    "authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...",
    "content-type": "application/json",
    "host": "192.168.1.141:8123"
  }
}

```

Possibly as a single line:

```auto
{"method":"post","protocol":"http","hostname":"192.168.1.141","port":8123,"path":"/api/services/light/turn_on","headers":{"authorization":"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...","content-type":"application/json","host":"192.168.1.141:8123"}}

```

And this in the second:

```auto
{
  "entity_id": "light.hall_uppe_tak",
  "brightness": 0
}

```

Single line:

```auto
{"entity_id":"light.hall_uppe_tak","brightness":0}

```

And lastly: there are a few integrations that will help integrate Home Assistant with Homey so you don’t have to use HTTP requests to control HA-managed devices:

- the [MQTT Hub](https://apps.athom.com/app/nl.hdg.mqtt) app for Homey
- the [Homey component](https://github.com/rogro82/io.homeassistant)

---

<div class="post-metadata">

**Author:** ![Dunnie](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dunnie/32/48765_2.png) [@Dunnie](https://community.homey.app/u/Dunnie)\
**Post date:** [September 4, 2023, 8:01pm UTC](https://community.homey.app/t/json-post-with-app-simple-http-connector-for-flows/16702/3 "2023-09-04T20:01:57Z")

</div>

hoi hoi

Ik heb sinds dit weekend de wifi modulle en ben er mee aan het stoeien.  
Nu probeer ik de ventilator via Json aan het aansturen bv [http://192.168.1.195/api.html?command=auto](http://192.168.1.195/api.html?command=auto)  
Nu lukt het me niet in een logica te krijgen voor m’n Homey 2019.  
Kan iemand mij op weg helpen?
