# How to POST / write continuous data to Thingspeak for visualization & analysis using the API link?

**URL:** <https://community.thunkable.com/t/how-to-post-write-continuous-data-to-thingspeak-for-visualization-analysis-using-the-api-link/1807190>\
**Category:** Questions about Thunkable X\
**Tags:** beginner\
**Created:** [March 29, 2022, 4:50am UTC](https://community.thunkable.com/t/how-to-post-write-continuous-data-to-thingspeak-for-visualization-analysis-using-the-api-link/1807190 "2022-03-29T04:50:57Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![s191020894x](https://avatars.discourse-cdn.com/v4/letter/s/ccd318/32.png) [@s191020894x](https://community.thunkable.com/u/s191020894x)\
**Post date:** [March 29, 2022, 4:50am UTC](https://community.thunkable.com/t/how-to-post-write-continuous-data-to-thingspeak-for-visualization-analysis-using-the-api-link/1807190/1 "2022-03-29T04:50:57Z")

</div>

I’m doing school project right now, building an app using the Thunkable (free version). So the process is that app will send the continuous data detected by the phone gyroscope/accelerator sensors by using the POST api link formatting to ThingspeakxMatlab(free version) for data visualization and analysis, that the data detected by the phone sensor through the app will be compared with a set of data so that the Thingspeak will classify the conditions of the users.  
I tried to post the data from the app to Thingspeak in many ways but it doesn’t work. Is there steps I have done wrong? How should I write the api link to send the data to Thingspeak? Should I use different platforms to do my work?

 ![api](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/d/cd269f43a1bb34fc4fd6be8ca32529e37e58b1d9.jpeg)  
 ![sample 1](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/a/daf627f633de13574d92c8045ccb1e4092bfaded.png)

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [March 29, 2022, 10:45am UTC](https://community.thunkable.com/t/how-to-post-write-continuous-data-to-thingspeak-for-visualization-analysis-using-the-api-link/1807190/2 "2022-03-29T10:45:49Z")

</div>

What do the thingspeak docs recommend for connecting to their platform?

---

<div class="post-metadata">

**Author:** ![s191020894x](https://avatars.discourse-cdn.com/v4/letter/s/ccd318/32.png) [@s191020894x](https://community.thunkable.com/u/s191020894x)\
**Post date:** [March 29, 2022, 4:38pm UTC](https://community.thunkable.com/t/how-to-post-write-continuous-data-to-thingspeak-for-visualization-analysis-using-the-api-link/1807190/3 "2022-03-29T16:38:59Z")

</div>

Here is where I get the reference. [REST API - MATLAB & Simulink](https://www.mathworks.com/help/thingspeak/rest-api.html)

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [March 29, 2022, 4:53pm UTC](https://community.thunkable.com/t/how-to-post-write-continuous-data-to-thingspeak-for-visualization-analysis-using-the-api-link/1807190/4 "2022-03-29T16:53:55Z")

</div>

You should be able to POST data to almost any REST endpoint. If you need to stream data, that’ll be a different case.

The docs indicate a POST should work, i encourage you to digest those docs and read through the forums as there are great examples of working with API’s.

We also have some great examples of working with API’s at [academy.thunkable.com](http://academy.thunkable.com)

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [March 29, 2022, 6:09pm UTC](https://community.thunkable.com/t/how-to-post-write-continuous-data-to-thingspeak-for-visualization-analysis-using-the-api-link/1807190/5 "2022-03-29T18:09:49Z")

</div>

You are mixing between the text type and the `JSON` type.

You are using the `text` format of the API and therefore you should use it this way

```auto
https://api.thingspeak.com/update?api_key=xxxxxxxxxxxx&field1=73

```

Try this from your browser after replacing xxxxxx with your API KEY and you should get a response.

---

<div class="post-metadata">

**Author:** ![s191020894x](https://avatars.discourse-cdn.com/v4/letter/s/ccd318/32.png) [@s191020894x](https://community.thunkable.com/u/s191020894x)\
**Post date:** [April 8, 2022, 9:46am UTC](https://community.thunkable.com/t/how-to-post-write-continuous-data-to-thingspeak-for-visualization-analysis-using-the-api-link/1807190/6 "2022-04-08T09:46:03Z")

</div>

Thank you for the help. I try to send the gyroscope value to Firebase Realtime database and it works well in showing the values in the text blocks only if I put the gyroscope1 block inside a “run forever” loop. (I still cannot send the values per second using the loop blocks though)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)\
**Post date:** [July 7, 2022, 9:46am UTC](https://community.thunkable.com/t/how-to-post-write-continuous-data-to-thingspeak-for-visualization-analysis-using-the-api-link/1807190/7 "2022-07-07T09:46:33Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
