lequipecreative Posted May 17, 2023 Posted May 17, 2023 Hello, I would like to make a call to the Squarespace api from the same site. I make the call in Ajax, I enter the generate key and the information that goes well. When I test the api on Postman I have no problem, but on your site it does not work. Here is the code I use. $.ajax({ url: "https://api.squarespace.com/1.0/commerce/products/645e5d10f42c0a69dde5224f", headers: { "Authorization": "Bearer XXXXX-XXX-XXX-XXX-XXXXX", "Content-Type": "application/json", "cache-control": "no-cache", }, type: "GET", dataType: "jsonp", }); Do you know if it is possible to make calls to your API directly from your SquareSpace sites? If yes, what is the right manipulation to do to be able to do it? If not, what is the right procedure if I want to retrieve data from the API from your SquareSpace sites? Thank you in advance for your help.
paul2009 Posted May 17, 2023 Posted May 17, 2023 Can you explain the overall goal? What data are you trying to retrieve and why? Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥. Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links. Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment