[SOLVED] Help with quote machine


CodePen is giving me a hard time with an Unexpected error whenever I try to add $.getJSON to my function. Could anyone take a look and provide me with feedback. Thanks in advance.


I had to first include javascript in your pen (it was throwing $ is undefined error)

After that —

Have you tried to hit your API endpoint? When you do it says you are missing the API key.

In your terminal you can type curl https://andruxnet-random-famous-quotes.p.mashape.com/
to check out the response you get from the API.

Usually the API key is included when you make the request to allow for server side verification. There will be more details on what/how to include your key in the docs for the api you are using


Sorry forgot to mention you can find the API details here https://market.mashape.com/andruxnet/random-famous-quotes

A couple things to note:

you’ll need to include your API key as I mentioned above
you also need to include some query string parameters like ?cat=movies&count=10 etc


I was able to get the API key. Thanks!