I am implementing a “View Invoice PDF” feature on my webpage, allowing users to access their invoice PDFs via the following Square Sandbox URL:
https://app.squareupsandbox.com/invoices/{invoiceId}/attachments/pdf?inline=true
Currently, this functionality works if I am logged into the Square Dashboard on the same browser. However, when accessed from a different browser or by an unauthenticated user, the following authentication error occurs:
{ “errors”: [ { “category”: “AUTHENTICATION_ERROR”, “code”: “UNAUTHORIZED”, “detail”: “This request could not be authorized.” } ] }
This prevents users from viewing and downloading their invoice PDFs unless they are logged into Square. Is there a way to resolve this issue, or is authentication a strict requirement for accessing invoice attachments?
Best regards,