API google distance matrix only works on thunkable live test, not on web app

Hi everyone!

I added the google maps distance matrix API on my web app, but somehow it only works fine when I test on my phone (on thunkable live test). When I publish the web app, it does not work.

Web app:
next to “taxa de entrega” is supposed to appear the delivery fee that comes out from the API

image

When I test on the live test on my phone, it works fine:

This is the code:

“app variable frete” is what appears next to the “taxa de entrega” label

Hi there,

Have you tried using the green error output block to check for an error, and display it if there is one?
You can use blocks like this to do so:

1 Like

H! Thank you for answering it.

I put a block „If Status = 200“, to make sure there is no errors. The Problem is that when I try on Web App it doesnt work, but when I try on live Test, it does work

Some APIs don’t work in the web app. That might be the case here. Looking at the error message will confirm that. If you’re building for phones (not planning to publish as a web app), then you should be OK.

1 Like

I did this and when I open on web app, it says:

“the website or service provider you are trying to reach does not support HTTPS requests”. Is this because of the google distance matrix API or is it because of the web app of thunkable, that does not support?

I am building an web app :frowning: