[Solved] Project won't GET data from API in Web Preview [CORS issue]

At this time, web apps and web preview wont work with all api’s due to CORS issues. One way to get around this issue would be to proxy the calls using a service like Xano as shown below. If you try the following URL in a web previewed Thunkable app, you’ll notice the issue that requires proxying the call.

http://numbersapi.com/2022/year?json

[updated video ^^^]

The idea here is that if you have an API that you can’t access but want to be able to using web apps or live preview, you can proxy them using a service like Xano

Remixable Project Link
[update added project link ^^^]

@manyone has included a solid example for most use cases! Thank you!!

@muneer is right though and if you are passing sensitive info, you need to ensure your data clearing house (xano in this case) and you have signed the appropriate agreements (e.g. BAA) or that. they. engage in the appropriate type of encryption. Additionally, you may need to ensure that your server is located in an appropriate geographical location (e.g. the EU vs US).

2 Likes