# What would be the best way to make a JSON get requests like this?

**URL:** <https://community.homey.app/t/what-would-be-the-best-way-to-make-a-json-get-requests-like-this/82865>\
**Category:** Questions & Help\
**Created:** [June 22, 2023, 9:14am UTC](https://community.homey.app/t/what-would-be-the-best-way-to-make-a-json-get-requests-like-this/82865 "2023-06-22T09:14:02Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Icepick](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/icepick/32/56463_2.png) [@Icepick](https://community.homey.app/u/Icepick)\
**Post date:** [June 22, 2023, 9:14am UTC](https://community.homey.app/t/what-would-be-the-best-way-to-make-a-json-get-requests-like-this/82865/1 "2023-06-22T09:14:02Z")

</div>

I have no experience with posting json data via a web get on the homey. What app would be most suitable to make calls like this? Currently I use CURL from the command line for it;

curl   
-H “X-Vestaboard-Api-Key: $key”   
-H “X-Vestaboard-Api-Secret: $secret”   
-d ‘{“text”: “Hello test message”}’ [https://platform.vestaboard.com/subscriptions/$subscriptions/message](https://platform.vestaboard.com/subscriptions/$subscriptions/message)

---

<div class="post-metadata">

**Author:** ![RonnyW](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ronnyw/32/10879_2.png) [@RonnyW](https://community.homey.app/u/RonnyW)\
**Post date:** [June 22, 2023, 10:45am UTC](https://community.homey.app/t/what-would-be-the-best-way-to-make-a-json-get-requests-like-this/82865/2 "2023-06-22T10:45:20Z")

</div>

You can use this flow action card:

 ![grafik](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/f/4/f4ce1b266d4860c78917d65addbc65c5b952678d.png)

I’m nut sure if header field must be set as JSON object like this:  
 ![grafik](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/9/d/9d3c75f76b8d925af7861e59d5248e727b8d41c4.png)

You have to set the $key and $secret in then flow card field. Or you can use global tags (variables) to fill them dynamically.

---

<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:** [June 22, 2023, 10:49am UTC](https://community.homey.app/t/what-would-be-the-best-way-to-make-a-json-get-requests-like-this/82865/3 "2023-06-22T10:49:55Z")

</div>

> [@RonnyW](#):
>
> I’m nut sure if header field must be set as JSON object like this:

It should not, you have to add headers as plain text, one per line:

```auto
X-Vestaboard-Api-Key: $key
X-Vestaboard-Api-Secret: $secret

```

And not use “smart quotes” in the body data, just regular ones (`"`)

---

<div class="post-metadata">

**Author:** ![Icepick](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/icepick/32/56463_2.png) [@Icepick](https://community.homey.app/u/Icepick)\
**Post date:** [June 22, 2023, 11:03am UTC](https://community.homey.app/t/what-would-be-the-best-way-to-make-a-json-get-requests-like-this/82865/4 "2023-06-22T11:03:29Z")

</div>

Hi Robert,  
Somehow it’s throwing me a 404. I used the one header per line (i saw you write on this forum about it before).  
What do you mean by smart quotes? Single quotes?  
This is what I got right now;

Url:  
`https://platform.vestaboard.com/subscriptions/SUBKEY/message`  
Headers;

```auto
X-Vestaboard-Api-Key: APIKEY
X-Vestaboard-Api-Secret: APISECRET

```

Body;  
`{"text": "Hello"}`

(cant upload a screenshot for some reason but this is what I copied from the flow).  
What am I missing?

Update: did some more testing and I think the problem is the body… when I just request my vestaboards installation information it doesnt need a body and that seems to work.

---

<div class="post-metadata">

**Author:** ![RonnyW](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ronnyw/32/10879_2.png) [@RonnyW](https://community.homey.app/u/RonnyW)\
**Post date:** [June 22, 2023, 11:10am UTC](https://community.homey.app/t/what-would-be-the-best-way-to-make-a-json-get-requests-like-this/82865/5 "2023-06-22T11:10:27Z")

</div>

Thanks, Robert.  
I just copied the examples above. But yes, standard quotes `"..."` must be used.

Edit: just inserted standard quotes and the forum software converts to Unicode 😑

---

<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:** [June 22, 2023, 11:16am UTC](https://community.homey.app/t/what-would-be-the-best-way-to-make-a-json-get-requests-like-this/82865/6 "2023-06-22T11:16:15Z")

</div>

Make it a `POST` request.

---

<div class="post-metadata">

**Author:** ![Icepick](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/icepick/32/56463_2.png) [@Icepick](https://community.homey.app/u/Icepick)\
**Post date:** [June 22, 2023, 11:33am UTC](https://community.homey.app/t/what-would-be-the-best-way-to-make-a-json-get-requests-like-this/82865/7 "2023-06-22T11:33:58Z")

</div>

> [@Icepick](#):
>
> {“text”: “Hello”}

Ah… silly of me… of course…  
Works like a charm… thanks!
