# I tried to create autocomplete address with geoapify.com api, there was a problem in fetch json, please help me Robert Petitto

**URL:** <https://community.glideapps.com/t/i-tried-to-create-autocomplete-address-with-geoapify-com-api-there-was-a-problem-in-fetch-json-please-help-me-robert-petitto/66565>\
**Category:** Ask for Help\
**Created:** [September 27, 2023, 2:39pm UTC](https://community.glideapps.com/t/i-tried-to-create-autocomplete-address-with-geoapify-com-api-there-was-a-problem-in-fetch-json-please-help-me-robert-petitto/66565 "2023-09-27T14:39:57Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![aocto\_digital](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/aocto_digital/32/60807_2.png) [@aocto\_digital](https://community.glideapps.com/u/aocto_digital)\
**Post date:** [September 27, 2023, 2:39pm UTC](https://community.glideapps.com/t/i-tried-to-create-autocomplete-address-with-geoapify-com-api-there-was-a-problem-in-fetch-json-please-help-me-robert-petitto/66565/1 "2023-09-27T14:39:57Z")

</div>

i tried to create autocomplete address with [geoapify.com](http://geoapify.com) api, there was a problem in fetch json. please Does anyone want to help me fix this problem?

I have followed Robert Petitto YouTube tutorial

 ![fetcheror](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/3/b/3bb7054733f1732a147f1d5695be2996916a93ff.png)

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [September 27, 2023, 2:55pm UTC](https://community.glideapps.com/t/i-tried-to-create-autocomplete-address-with-geoapify-com-api-there-was-a-problem-in-fetch-json-please-help-me-robert-petitto/66565/2 "2023-09-27T14:55:04Z")

</div>

This error means that the endpoint is incorrect OR that geoapify changed something on their end and now Glide is preventing the API from being called from within a Fetch JSON column (due to CORS).

---

<div class="post-metadata">

**Author:** ![aocto\_digital](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/aocto_digital/32/60807_2.png) [@aocto\_digital](https://community.glideapps.com/u/aocto_digital)\
**Post date:** [September 27, 2023, 2:57pm UTC](https://community.glideapps.com/t/i-tried-to-create-autocomplete-address-with-geoapify-com-api-there-was-a-problem-in-fetch-json-please-help-me-robert-petitto/66565/3 "2023-09-27T14:57:25Z")

</div>

extraordinary thank you to receive an answer from you, I always follow your YouTube

---

<div class="post-metadata">

**Author:** ![aocto\_digital](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/aocto_digital/32/60807_2.png) [@aocto\_digital](https://community.glideapps.com/u/aocto_digital)\
**Post date:** [September 27, 2023, 2:59pm UTC](https://community.glideapps.com/t/i-tried-to-create-autocomplete-address-with-geoapify-com-api-there-was-a-problem-in-fetch-json-please-help-me-robert-petitto/66565/4 "2023-09-27T14:59:27Z")

</div>

> [@Robert\_Petitto](#):
>
> This error means that the endpoint is incorrect OR that geoapify changed something on their end and now Glide is preventing the API from being called from within a Fetch JSON column (due to CORS).

Is there another solution, sir?

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [September 27, 2023, 3:09pm UTC](https://community.glideapps.com/t/i-tried-to-create-autocomplete-address-with-geoapify-com-api-there-was-a-problem-in-fetch-json-please-help-me-robert-petitto/66565/5 "2023-09-27T15:09:41Z")

</div>

My demo app is still working…so geoapify still works in Glide. Check the endpoint:

 ![CleanShot 2023-09-27 at 11.09.00](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/7/d/7d61a3c6332692c5dcfa369f506a80ad147228ca.jpeg)

---

<div class="post-metadata">

**Author:** ![aocto\_digital](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/aocto_digital/32/60807_2.png) [@aocto\_digital](https://community.glideapps.com/u/aocto_digital)\
**Post date:** [September 27, 2023, 3:22pm UTC](https://community.glideapps.com/t/i-tried-to-create-autocomplete-address-with-geoapify-com-api-there-was-a-problem-in-fetch-json-please-help-me-robert-petitto/66565/6 "2023-09-27T15:22:27Z")

</div>

big thank you, I’ve found the problem host and protocol writing is carried over

- Protocol: `https`
- Host: `api.geoapify.com`
- Path: `v1/geocode/autocomplete`

new problems  
{“statusCode”:401,“error”:“Unauthorized”,“message”:“Invalid apiKey”}

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [September 27, 2023, 3:40pm UTC](https://community.glideapps.com/t/i-tried-to-create-autocomplete-address-with-geoapify-com-api-there-was-a-problem-in-fetch-json-please-help-me-robert-petitto/66565/7 "2023-09-27T15:40:47Z")

</div>

> [@aocto\_digital](#):
>
> ,“message”:“Invalid apiKey”}

Make sure you have a valid API Key from Geoapify

---

<div class="post-metadata">

**Author:** ![aocto\_digital](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/aocto_digital/32/60807_2.png) [@aocto\_digital](https://community.glideapps.com/u/aocto_digital)\
**Post date:** [September 27, 2023, 3:46pm UTC](https://community.glideapps.com/t/i-tried-to-create-autocomplete-address-with-geoapify-com-api-there-was-a-problem-in-fetch-json-please-help-me-robert-petitto/66565/8 "2023-09-27T15:46:22Z")

</div>

> [@aocto\_digital](#):
>
> {“statusCode”:401,“error”:“Unauthorized”,“message”:“Invalid apiKey”}

I checked by [Best JSON Viewer and JSON Beautifier Online](https://codebeautify.org/jsonviewer), and there are:  
statusCode : 401  
error : Unauthorized  
message : Invalid apiKey  
(( But the apiKey is correct.  
I made another account & apiKey at Geoapify, but it was not helps.  
What’s wrong?

---

<div class="post-metadata">

**Author:** ![aocto\_digital](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/aocto_digital/32/60807_2.png) [@aocto\_digital](https://community.glideapps.com/u/aocto_digital)\
**Post date:** [September 27, 2023, 4:07pm UTC](https://community.glideapps.com/t/i-tried-to-create-autocomplete-address-with-geoapify-com-api-there-was-a-problem-in-fetch-json-please-help-me-robert-petitto/66565/9 "2023-09-27T16:07:28Z")

</div>

_Image redacted. Contains API key which should not be shared with the world._

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [September 27, 2023, 4:30pm UTC](https://community.glideapps.com/t/i-tried-to-create-autocomplete-address-with-geoapify-com-api-there-was-a-problem-in-fetch-json-please-help-me-robert-petitto/66565/10 "2023-09-27T16:30:54Z")

</div>

Your API key is just the key. Not the entire URL. It’s failing because the API key contains more than just the key.

PS, I removed your image because you were sharing your API key with everyone.

---

<div class="post-metadata">

**Author:** ![aocto\_digital](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/aocto_digital/32/60807_2.png) [@aocto\_digital](https://community.glideapps.com/u/aocto_digital)\
**Post date:** [September 28, 2023, 1:11pm UTC](https://community.glideapps.com/t/i-tried-to-create-autocomplete-address-with-geoapify-com-api-there-was-a-problem-in-fetch-json-please-help-me-robert-petitto/66565/11 "2023-09-28T13:11:08Z")

</div>

thank you for closing my api key 🙂 🙏

---

<div class="post-metadata">

**Author:** ![aocto\_digital](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/aocto_digital/32/60807_2.png) [@aocto\_digital](https://community.glideapps.com/u/aocto_digital)\
**Post date:** [September 28, 2023, 1:12pm UTC](https://community.glideapps.com/t/i-tried-to-create-autocomplete-address-with-geoapify-com-api-there-was-a-problem-in-fetch-json-please-help-me-robert-petitto/66565/12 "2023-09-28T13:12:11Z")

</div>

I have corrected the key, but the error still remains, why?

 ![fetcheoror2](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/f/5/f56df84ec184e763bda0c328d53ec4f5c3eebafb.png)  
 ![key](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/3/2304b774dd077ddf5a23a9714eb3cddfba58b034.png)

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [September 28, 2023, 1:28pm UTC](https://community.glideapps.com/t/i-tried-to-create-autocomplete-address-with-geoapify-com-api-there-was-a-problem-in-fetch-json-please-help-me-robert-petitto/66565/13 "2023-09-28T13:28:56Z")

</div>

I guess my only suggestion is to double check your API key and make sure it’s correct. If I use the same url without an API key, I get the same error, so that suggests that your API key is not valid.

If I recall before deleting your image, I think the key you were using was all numbers, which didn’t look right to me, but I don’t know. Usually I would expect an API key to be a mix of both numbers and letters. All depends on the API provider though.

---

<div class="post-metadata">

**Author:** ![aocto\_digital](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/aocto_digital/32/60807_2.png) [@aocto\_digital](https://community.glideapps.com/u/aocto_digital)\
**Post date:** [September 28, 2023, 1:47pm UTC](https://community.glideapps.com/t/i-tried-to-create-autocomplete-address-with-geoapify-com-api-there-was-a-problem-in-fetch-json-please-help-me-robert-petitto/66565/14 "2023-09-28T13:47:18Z")

</div>

> [@Jeff\_Hager](#):
>
> If I recall before deleting your image, I think the key you were using was all numbers, which didn’t look right to me, but I don’t know. Usually I would expect an API key to be a mix of both numbers and letters. All depends on the API provider though.

that’s right my key is letters and numbers

---

<div class="post-metadata">

**Author:** ![aocto\_digital](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/aocto_digital/32/60807_2.png) [@aocto\_digital](https://community.glideapps.com/u/aocto_digital)\
**Post date:** [September 28, 2023, 2:54pm UTC](https://community.glideapps.com/t/i-tried-to-create-autocomplete-address-with-geoapify-com-api-there-was-a-problem-in-fetch-json-please-help-me-robert-petitto/66565/15 "2023-09-28T14:54:40Z")

</div>

i have found the problem, problem with the arrangement of capital letters in QUERY PARAMETERS, the correct one is apiKey ( letter K kapital)

thanks my brotherr

---

<div class="post-metadata">

**Author:** ![burningmikey](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/burningmikey/32/49706_2.png) [@burningmikey](https://community.glideapps.com/u/burningmikey)\
**Post date:** [September 29, 2023, 7:36pm UTC](https://community.glideapps.com/t/i-tried-to-create-autocomplete-address-with-geoapify-com-api-there-was-a-problem-in-fetch-json-please-help-me-robert-petitto/66565/16 "2023-09-29T19:36:49Z")

</div>

> [@Robert\_Petitto](#):
>
> CORS

Hi Robert, what do you mean by CORS? It seems that Glide is blocking the Google Map API (Autocomplete).

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [September 30, 2023, 3:29am UTC](https://community.glideapps.com/t/i-tried-to-create-autocomplete-address-with-geoapify-com-api-there-was-a-problem-in-fetch-json-please-help-me-robert-petitto/66565/17 "2023-09-30T03:29:09Z")

</div>

> **[Cross-origin resource sharing](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing)**
>
> Cross-origin resource sharing (CORS) is a mechanism that allows restricted resources on a web page to be accessed from another domain outside the domain from which the first resource was served.
> A web page may freely embed cross-origin images, stylesheets, scripts, iframes, and videos. Certain "cross-domain" requests, notably Ajax requests, are forbidden by default by the same-origin security policy. CORS defines a way in which a browser and server can interact to determine whether it is safe to...
