Making an API request to any API

RuzenDev
Visitor
1 0 0

Hey there,
     I am trying to get the data from a random endpoint and show in the Shopify liquid file. 
I am using fetch of JS and trying to get the data inside a liquid file. However, I am getting a 401 error.

Can anyone teach me if there is any way to make  an API request to any endpoint such as twitterAPI/instagramAPI? 

Your help would be highly appreciated.

Thank You!

Reply 1 (1)

Jason
Shopify Expert
11190 225 2283

Your post isn't quite clear so lets focus on this part:

     I am trying to get the data from a random endpoint and show in the Shopify liquid file. 

What is the random endpoint you are calling from your JavaScript file. Or better still, what is the code block?

When you tried it, did you see an error in the console and if so what was it?

★ I jump on these forums in my free time to help and share some insights. Not looking to be hired, and not looking for work. http://freakdesign.com.au ★