# Fetch JSON doesn't work

**URL:** <https://community.glideapps.com/t/fetch-json-doesnt-work/69318>\
**Category:** Ask for Help\
**Created:** [January 6, 2024, 11:23pm UTC](https://community.glideapps.com/t/fetch-json-doesnt-work/69318 "2024-01-06T23:23:47Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vikatchu](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/vikatchu/32/68714_2.png) [@Vikatchu](https://community.glideapps.com/u/Vikatchu)\
**Post date:** [January 6, 2024, 11:23pm UTC](https://community.glideapps.com/t/fetch-json-doesnt-work/69318/1 "2024-01-06T23:23:47Z")

</div>

Hello,

I’m trying to integrate the MobyGames API but I’m getting this error message.  
Can anyone help me? Thanks

> **[API Documentation - MobyGames](https://www.mobygames.com/info/api/#games)**
>
> MobyGames API MobyGames now features a fully fledged video game database API for exporting and extracting all kinds of useful information from our world-leading database! If you'd like access to...

" Function Error

TypeError: Failed to fetch"

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

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [January 6, 2024, 11:25pm UTC](https://community.glideapps.com/t/fetch-json-doesnt-work/69318/2 "2024-01-06T23:25:02Z")

</div>

Try to paste that URL into your browser and see what it says… do you have an API key for that service?

---

<div class="post-metadata">

**Author:** ![Vikatchu](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/vikatchu/32/68714_2.png) [@Vikatchu](https://community.glideapps.com/u/Vikatchu)\
**Post date:** [January 6, 2024, 11:27pm UTC](https://community.glideapps.com/t/fetch-json-doesnt-work/69318/3 "2024-01-06T23:27:54Z")

</div>

I’m afflicted with this  
As an example, I put in Minecraft and got this.

And yes

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/0/c088e4e23c97aeaa0a06bc32227206878ecc1149.png)

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [January 6, 2024, 11:29pm UTC](https://community.glideapps.com/t/fetch-json-doesnt-work/69318/4 "2024-01-06T23:29:17Z")

</div>

it might be blocking Glide origin… did you try to fetch directly from the JavaScript column?

you can paste the URL here or PM me, so we can try…

---

<div class="post-metadata">

**Author:** ![Vikatchu](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/vikatchu/32/68714_2.png) [@Vikatchu](https://community.glideapps.com/u/Vikatchu)\
**Post date:** [January 6, 2024, 11:30pm UTC](https://community.glideapps.com/t/fetch-json-doesnt-work/69318/5 "2024-01-06T23:30:55Z")

</div>

No, but I don’t know how to do it  
here I was following a tutorial on youtube

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [January 6, 2024, 11:55pm UTC](https://community.glideapps.com/t/fetch-json-doesnt-work/69318/6 "2024-01-06T23:55:24Z")

</div>

here you go:

> **[SA Test App](https://sa-test-app.glide.page)**
>
> StructureArt Digital test App

---

<div class="post-metadata">

**Author:** ![Vikatchu](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/vikatchu/32/68714_2.png) [@Vikatchu](https://community.glideapps.com/u/Vikatchu)\
**Post date:** [January 6, 2024, 11:56pm UTC](https://community.glideapps.com/t/fetch-json-doesnt-work/69318/7 "2024-01-06T23:56:55Z")

</div>

omg!! how ? With GAS ?  
Would you please explain or show me?

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [January 6, 2024, 11:57pm UTC](https://community.glideapps.com/t/fetch-json-doesnt-work/69318/8 "2024-01-06T23:57:46Z")

</div>

Yep… the power of GAS!!!

I wonder why it is rejecting Glide origin…

---

<div class="post-metadata">

**Author:** ![Vikatchu](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/vikatchu/32/68714_2.png) [@Vikatchu](https://community.glideapps.com/u/Vikatchu)\
**Post date:** [January 7, 2024, 12:00am UTC](https://community.glideapps.com/t/fetch-json-doesnt-work/69318/9 "2024-01-07T00:00:26Z")

</div>

Here, I’ve managed to create a GAS, but after that, I don’t know what to do or what to put in it.

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [January 7, 2024, 12:01am UTC](https://community.glideapps.com/t/fetch-json-doesnt-work/69318/10 "2024-01-07T00:01:06Z")

</div>

Do you want to take some classes with me? 😉  
Try to figure it out by yourself. It is fun to learn.  
If you fail… you can hire me.

---

<div class="post-metadata">

**Author:** ![Vikatchu](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/vikatchu/32/68714_2.png) [@Vikatchu](https://community.glideapps.com/u/Vikatchu)\
**Post date:** [January 7, 2024, 12:03am UTC](https://community.glideapps.com/t/fetch-json-doesnt-work/69318/11 "2024-01-07T00:03:18Z")

</div>

Haha that’s tempting, if I can finally do that in the back!

---

<div class="post-metadata">

**Author:** ![Vikatchu](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/vikatchu/32/68714_2.png) [@Vikatchu](https://community.glideapps.com/u/Vikatchu)\
**Post date:** [January 7, 2024, 12:08am UTC](https://community.glideapps.com/t/fetch-json-doesnt-work/69318/12 "2024-01-07T00:08:20Z")

</div>

No, please help me, I’ve been on it since yesterday and I can’t take it anymore.

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [January 7, 2024, 12:11am UTC](https://community.glideapps.com/t/fetch-json-doesnt-work/69318/13 "2024-01-07T00:11:41Z")

</div>

oh… maybe that’s why your Glide origin is blocked… you exited limit of API calls LOL

---

<div class="post-metadata">

**Author:** ![david](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/david/32/62831_2.png) [@david](https://community.glideapps.com/u/david)\
**Post date:** [January 7, 2024, 6:11pm UTC](https://community.glideapps.com/t/fetch-json-doesnt-work/69318/14 "2024-01-07T18:11:39Z")

</div>

This API uses CORS so it can only be called from a backend server. Fetch JSON runs on the client and is blocked (not because it’s Glide)–most APIs do this.

---

<div class="post-metadata">

**Author:** ![Vikatchu](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/vikatchu/32/68714_2.png) [@Vikatchu](https://community.glideapps.com/u/Vikatchu)\
**Post date:** [January 7, 2024, 6:17pm UTC](https://community.glideapps.com/t/fetch-json-doesnt-work/69318/15 "2024-01-07T18:17:33Z")

</div>

Here I’ve found a new api, a new link and everything works perfectly with JSON. The only problem is that I can’t get a precise criterion (the game genre) and yet it’s in the link.

const jsonString = p1;

const javascriptObject =  
JSON.parse(jsonString);

return javascriptObject[p2].rating;

That’s the code for the ratings, do you have any idea how to get the genders? I’ve tried .genres (but it loops endlessly), I’ve tried .genres.name or .genresName but nothing works and nothing appears…

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [January 7, 2024, 6:40pm UTC](https://community.glideapps.com/t/fetch-json-doesnt-work/69318/16 "2024-01-07T18:40:48Z")

</div>

You have to create a helper table to break down the JSON into rows.

---

<div class="post-metadata">

**Author:** ![Vikatchu](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/vikatchu/32/68714_2.png) [@Vikatchu](https://community.glideapps.com/u/Vikatchu)\
**Post date:** [January 7, 2024, 7:58pm UTC](https://community.glideapps.com/t/fetch-json-doesnt-work/69318/17 "2024-01-07T19:58:24Z")

</div>

What does that mean?

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [January 7, 2024, 8:10pm UTC](https://community.glideapps.com/t/fetch-json-doesnt-work/69318/18 "2024-01-07T20:10:24Z")

</div>

Something like that:

 ![Screenshot 2024-01-07 at 3.10.03 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/6/1/61b88990c20da666186361439cd74c7e1353269e.jpeg)

---

<div class="post-metadata">

**Author:** ![Vikatchu](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/vikatchu/32/68714_2.png) [@Vikatchu](https://community.glideapps.com/u/Vikatchu)\
**Post date:** [January 7, 2024, 8:17pm UTC](https://community.glideapps.com/t/fetch-json-doesnt-work/69318/19 "2024-01-07T20:17:59Z")

</div>

Can I invite you on my glides and have you help me, please? Because I’m happy to have succeeded in what I did yesterday, but now I’m reblocking.

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [January 7, 2024, 8:26pm UTC](https://community.glideapps.com/t/fetch-json-doesnt-work/69318/20 "2024-01-07T20:26:16Z")

</div>

Is that what you are looking for?

 ![Screenshot 2024-01-07 at 3.25.10 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/f/5/f5841b5c2c52d958327124ca647345f306acbf9d.jpeg)

 ![Screenshot 2024-01-07 at 3.25.23 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/0/e/0ead584dba71f0be3e75de579359ba6d6eb24485.jpeg)

[Next page](https://community.glideapps.com/t/fetch-json-doesnt-work/69318.md?page=2)
