Square Sandbox Orders API – 403 FORBIDDEN despite correct location ID

Hi Square Developer Support,

I’m testing the Orders API in Sandbox for my website, JB Kids Essentials.

CreateOrder returns 403 FORBIDDEN with:
Not authorized to access orders with location_id=LKP76VD9V4GAO

An earlier CreateOrder request succeeded with HTTP 200, but newer requests fail.

Merchant ID: MLNYK1TZF9KJF

Trace ID: KHWjKFhhSfDDJ

Could you help identify why my Sandbox application cannot access this location and how to resolve it?

Thank you.

This 403 means the access token on the failing requests isn’t authorized for the Sandbox seller account that owns location LKP76VD9V4GAO. The usual cause is that the token changed between the request that worked and the ones that fail. For example, you switched to a different Sandbox test account’s token, an OAuth token issued for another seller, or your production token.

To confirm:

If either check fails, use the access token for the Sandbox test account that owns that location. You can find it in the Developer Console under Credentials > Sandbox. If you’re using OAuth, have that seller authorize again. If both checks pass and the 403 continues, reply with your application ID and the full request and response and I can take a deeper look for you!