# How do I use the Web API Component?

**URL:** <https://community.thunkable.com/t/how-do-i-use-the-web-api-component/874198>\
**Category:** Questions about Thunkable X\
**Tags:** solved, beginner, webapi\
**Created:** [October 5, 2020, 4:33am UTC](https://community.thunkable.com/t/how-do-i-use-the-web-api-component/874198 "2020-10-05T04:33:07Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![v.krishna](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/v.krishna/32/84811_2.png) [@v.krishna](https://community.thunkable.com/u/v.krishna)\
**Post date:** [October 5, 2020, 4:33am UTC](https://community.thunkable.com/t/how-do-i-use-the-web-api-component/874198/1 "2020-10-05T04:33:07Z")

</div>

hi everyone I am actually suffering from a problem on the web API component in the thunkable and I need your help. when I am previewing an app with web API, it needs to fetch some data and show it on the label, when it tries to fetch it is showing a blank screen

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [October 5, 2020, 4:44am UTC](https://community.thunkable.com/t/how-do-i-use-the-web-api-component/874198/2 "2020-10-05T04:44:31Z")

</div>

Hi and welcome to Thunkable!

For a Web API call to work, you’ll need to try it first in a browser such as Chrome. If you get a valid response in the browser, then you can start to build blocks in Thunkable to recreate what worked as a url.

What response are you getting when you do the call as a url?

A blank screen means that some part of your API call is invalid. Make sure that _after_ you get it to work in a browser with a url that you also check to make sure there is no error (the green block) and that the status (green block) is equal to “200”.

---

<div class="post-metadata">

**Author:** ![v.krishna](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/v.krishna/32/84811_2.png) [@v.krishna](https://community.thunkable.com/u/v.krishna)\
**Post date:** [October 5, 2020, 5:27am UTC](https://community.thunkable.com/t/how-do-i-use-the-web-api-component/874198/3 "2020-10-05T05:27:22Z")

</div>

thanks you for your reply but I just called and got the required response and it worked but when it is trying to fetch some more data and show the results it is suddenly disappearing and showing the made with thunkable logo (in phone and in laptop it is showing a blank screen) and I checked the troubleshooting but my problem is not related to it.

---

<div class="post-metadata">

**Author:** ![v.krishna](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/v.krishna/32/84811_2.png) [@v.krishna](https://community.thunkable.com/u/v.krishna)\
**Post date:** [October 5, 2020, 5:29am UTC](https://community.thunkable.com/t/how-do-i-use-the-web-api-component/874198/4 "2020-10-05T05:29:07Z")

</div>

the api I am using : [https://panjetani.000webhostapp.com/lat\_long.php?city=Rajahmundry](https://panjetani.000webhostapp.com/lat_long.php?city=Rajahmundry)

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [October 5, 2020, 5:48am UTC](https://community.thunkable.com/t/how-do-i-use-the-web-api-component/874198/5 "2020-10-05T05:48:47Z")

</div>

> [@v.krishna](#):
>
> [https://panjetani.000webhostapp.com/lat\_long.php?city=Rajahmundry](https://panjetani.000webhostapp.com/lat_long.php?city=Rajahmundry)

That is a valid JSON response. Make sure you are testing your blocks in Thunkable Live on a **mobile device** or as a published web app (if you are a Pro user).

What blocks are you using to retrieve the data?

These work for me in Thunkable Live:

 ![Screen Shot 2020-10-04 at 10.52.22 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/e/0e50d10cf3fe93856ba364a89e8ee5e4eab4a2a3.png)

---

<div class="post-metadata">

**Author:** ![v.krishna](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/v.krishna/32/84811_2.png) [@v.krishna](https://community.thunkable.com/u/v.krishna)\
**Post date:** [October 5, 2020, 8:02am UTC](https://community.thunkable.com/t/how-do-i-use-the-web-api-component/874198/6 "2020-10-05T08:02:06Z")

</div>

hi, thanks for that image of the code blocks that you used for code, I didn’t check: if not error and status = 200. So this image might help me figure out this problem is yes then I will keep solved

---

<div class="post-metadata">

**Author:** ![v.krishna](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/v.krishna/32/84811_2.png) [@v.krishna](https://community.thunkable.com/u/v.krishna)\
**Post date:** [October 5, 2020, 8:05am UTC](https://community.thunkable.com/t/how-do-i-use-the-web-api-component/874198/7 "2020-10-05T08:05:58Z")

</div>

and one more api is there : [https://api.openweathermap.org/data/2.5/weather?q=Rajahmundry&units=imperial&APPID=143454aa39bbe3442a890cdbf3f9db36](https://api.openweathermap.org/data/2.5/weather?q=Rajahmundry&units=imperial&APPID=143454aa39bbe3442a890cdbf3f9db36) , once please check this also

---

<div class="post-metadata">

**Author:** ![v.krishna](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/v.krishna/32/84811_2.png) [@v.krishna](https://community.thunkable.com/u/v.krishna)\
**Post date:** [October 5, 2020, 8:15am UTC](https://community.thunkable.com/t/how-do-i-use-the-web-api-component/874198/8 "2020-10-05T08:15:06Z")

</div>

and I added the status and error but still no use . So, I wish to have the email id or contact gmail id of the thunkable X platform. If anybody know please give it to me

---

<div class="post-metadata">

**Author:** ![v.krishna](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/v.krishna/32/84811_2.png) [@v.krishna](https://community.thunkable.com/u/v.krishna)\
**Post date:** [October 5, 2020, 8:39am UTC](https://community.thunkable.com/t/how-do-i-use-the-web-api-component/874198/9 "2020-10-05T08:39:04Z")

</div>

hi , can anyone join this topic and help me figure out

---

<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:** [October 5, 2020, 9:46am UTC](https://community.thunkable.com/t/how-do-i-use-the-web-api-component/874198/10 "2020-10-05T09:46:16Z")

</div>

There are many many examples of how to use the api connector properly. Can you show a screenshot of your blocks you are using to connect to the api?

---

<div class="post-metadata">

**Author:** ![v.krishna](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/v.krishna/32/84811_2.png) [@v.krishna](https://community.thunkable.com/u/v.krishna)\
**Post date:** [October 5, 2020, 9:57am UTC](https://community.thunkable.com/t/how-do-i-use-the-web-api-component/874198/11 "2020-10-05T09:57:04Z")

</div>

![bug](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/5/d5b8c811f1db09c6d5a6cd71285b7143c56fa883.png) this is my image of the code I used

---

<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:** [October 5, 2020, 10:00am UTC](https://community.thunkable.com/t/how-do-i-use-the-web-api-component/874198/12 "2020-10-05T10:00:09Z")

</div>

i wonder why you are making 3 separate calls to the API. why not make 1 call and set your 3 labels at the same time? group the label setting blocks together

what happens when you try these blocks now?

---

<div class="post-metadata">

**Author:** ![v.krishna](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/v.krishna/32/84811_2.png) [@v.krishna](https://community.thunkable.com/u/v.krishna)\
**Post date:** [October 5, 2020, 10:01am UTC](https://community.thunkable.com/t/how-do-i-use-the-web-api-component/874198/13 "2020-10-05T10:01:33Z")

</div>

ok let me try out this .

---

<div class="post-metadata">

**Author:** ![v.krishna](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/v.krishna/32/84811_2.png) [@v.krishna](https://community.thunkable.com/u/v.krishna)\
**Post date:** [October 6, 2020, 6:43am UTC](https://community.thunkable.com/t/how-do-i-use-the-web-api-component/874198/14 "2020-10-06T06:43:07Z")

</div>

hi, my problem is solved because I took an object which is not there in JSON so… it is resolved it is the bug from my end

---

<div class="post-metadata">

**Author:** ![v.krishna](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/v.krishna/32/84811_2.png) [@v.krishna](https://community.thunkable.com/u/v.krishna)\
**Post date:** [October 6, 2020, 6:44am UTC](https://community.thunkable.com/t/how-do-i-use-the-web-api-component/874198/15 "2020-10-06T06:44:22Z")

</div>

it is solved

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 12:23pm UTC](https://community.thunkable.com/t/how-do-i-use-the-web-api-component/874198/16 "2024-11-08T12:23:37Z")

</div>


