Xero API Get File Content

Describe the problem/error/question

Xero API call to download a file gets the file as “content” not as pdf

What is the error message (if any)?

No error message. If you hit download on the binary data it is always a “content” file with no extension, even if the mime type in the binary field is set to application/pdf

Have tried using Accept = application/pdf and Accept =
application/octet-stream

The api documentation says Accept should be
application/octet-stream

When running this via xero API explorer I get the file as PDF. Only in n8n do I get this content file which I can open with a pdf tool.

Also tried turning on response format in the http request. Still same issue

Please share your workflow

Share the output returned by the last node

Information on your n8n setup

  • n8n version: Latest stable: 1.115.3
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Cloud
  • Operating system: n/A

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.