How do I use the Web API Component?

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

1 Like

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”.

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.

the api I am using :

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:

1 Like

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

and one more api is there : , once please check this also

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

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

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?

1 Like

this is my image of the code I used

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?

1 Like

ok let me try out this .

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

it is solved