Can We Implement API in our Thunkable App Projects?

api
webapi

#1

Hi,
I want to Implement TRN (Tracker Network) and FNBR.co API in my Thunkable App. Is this possible to implement API in our Apps?
If you know the way then tell me I will appreciate it and if it helps me I will make a donation to you.
Thanks


#2

Welcome!
What do you mean about “implement” API?
If you want “use” or “consume” some existing API, you can find a lot of tutorial here in the community. Start from Introduction to APIs by @Domhnall, you can’t go wrong!
If you mean “develop” or “offer” API to others, it’s a server matter, don’t Thunkable. Choose a programming language you like and you will find a lot of online tutorials.


#3

Yeah I read this tutorial and it’s really amazing, But I am using Tracker Network and FNBR.co API and both of them need me to include my api key in the headers. So how can we do that? This is what they wrote there
“All requests must include the header x-api-key with your API key.”


#4

see a header example here https://puravidaapps.com/dropbox.php
and here https://puravidaapps.com/spreadsheet.php
and here https://puravidaapps.com/filedownload.php#restricted
Taifun


#5

I did the third one (because that’s what I need), Now it’s not responding anything (Even not showing the error).


#6

It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be…

Taifun


#7

Look at these Screenshots, I attached the requirements of the website from where I want to Get Data in my app and attached the blocks and design section screenshot.
Thanks


#8

rather than Authorization try to use TRN-Api-Key as key without colon and your api key as value
Taifun


#9

Still same result (nothing happening after the button clicked)


#10

Try to call that URL with headers using a tool like Postman (or any other client) and check if server get you a kind of response.


#11

I checked it with Hurl.it and yes it’s give me a response with all the data I needed.


#12

I just removed (Set web1.Save Response) and it worked :slight_smile: and the Request Headers problem was solved from @Taifun link : https://puravidaapps.com/filedownload.php#restricted
Thanks.