Jump to content

Working with Squarespace's Commerce API

Recommended Posts

Hello to all... I've been having some trouble working with the squarespace commerce API in my development of a web app. I'm helping a friend create a custom site using React.js, and running an Express server to make calls to the API. My problem is everytime I try to fetch data, I get a server error 403 from Squarespace. Developer notes says each call must have request headers of authorization followed by a Bearer + API key given by squarespace and a user-agent.
 
Using Postman for testing when everything is plugged in, I get a successful return. Using my Express code using the same exact headers, an error gets returned.
Something I also noticed from the Developer Notes is:
Caution: All requests sent over HTTP instead of HTTPS are rejected.
 
It seems a bit impossible to secure my localhost when developing, so I'm somewhat lost in things to do. Any help?
Link to comment
  • Replies 0
  • Views 817
  • Created
  • Last Reply

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.