Random Quote Generator - API's Acting Strange in CodePen?

Hello all. I am currently working on the random quote generator project. I’m using the following API: https://quotesondesign.com/api-v4-0/.

I’ve noticed a lot of other’s have had issues with getting API’s to work in CodePen. but each solution seemed different and I didn’t quite find a tweak that worked for me with out causing further errors.

Here is my current code below - loosely based on the sample on the API’s site:

The weird part is, when I go under the network tab under the chrome dev tools, I can see the json object with a 200 ("ok) status, but its not showing on my page when I apply the quote content to my h3 element.

The returned result is an array, and the property you’re trying to access is for an object inside that array.

1 Like

Thanks for the pointing that out. It’s working as expected now after some changes :slight_smile:

1 Like