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?
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:
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.
I believe this is because it’s a sandbox invoice and you have to have the Dashboard open to see the invoice. In production the invoices will be accessible.
you didn’t answer his question. he said it WORKS FINE unless he’s logged in with the same browser. this IS NOT a sandbox thing.. which is clearly understood that pdf download is not implemented there.
Is it possible to download the PDF of the invoice Via the API? I am NOT talking about the customer clicking “Download PDF” but an API or other call do AUTOMATICALLY download it?
it seems this is only allowed while logged into the dashboard?