try kio4 extension (or default block or locationIQ website 5000 free limit per day)or try as said in the documentation
Side note: I would generally advise against using ChatGPT to program, especially with a lesser-known tool of a lesser-known platform like App Inventor.
Kindly provide a solution how I get the location
First, you have to post a location to the server. Do you have a Thingsspeak account?
This discussion might help you Roger:
Yes I have an account. Here are the links of latitude and Longitude.
https://thingspeak.com/channels/1832660/charts/4?bgcolor=%23ffffff&color=%23d62020&dynamic=true&results=60&title=Latitude&type=line
https://thingspeak.com/channels/1832660/charts/5?bgcolor=%23ffffff&color=%23d62020&dynamic=true&results=60&title=Longitude&type=line
Read the latitude and longitude data using a GotText Block I believe.
Here is an example that might help you >