Sandbox Online Site Preview Unauthorized Error

Hi, I just signed up for a sandbox developer account. Working towards setting up a test store catalog using the API.

From the sandbox dashboard, there is a message “Your online store is ready!” and a “Preview site” button which I clicked. The Online site preview displays on the right, but results in the below error message.

{“code”:“Unauthorized”,“message”:“Unauthorized”,“details”:}

Clicking the Site setup link bring me to the production site setup.

What am I missing here?

Thanks in advance.

:wave: I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:

Additional Documentation

Get Developer Credentials
https://developer.squareup.com/docs/oauth-api/walkthrough2
Get Started

If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.

The error message you’re seeing typically indicates an issue with authorization, possibly due to incorrect or missing credentials. However, it’s important to note that the Square Sandbox environment is primarily designed for testing API calls and transactions, and it doesn’t support a fully functional eCommerce website.

The “Preview site” button in the Sandbox Dashboard is not intended to provide a fully functional preview of a Square Online site. Instead, you can use the Sandbox environment to simulate API calls and transactions, and to test how your application handles these operations.

For setting up and previewing a full online store, you would need to use the production environment. Please ensure you’re using the correct credentials (Sandbox Application ID and Sandbox Access Token) when making API calls in the Sandbox environment.

This answer was reviewed by @Bryan-Square.