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.