You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use the attachment endpoints which are in this wrapper, and I'm posting this with the understanding they're not properly supported yet – but thought someone might be able to help.
I can't seem to get around this error:
I've read the code and am posting like this:
let stats = fs.statSync(`/tmp/myfile.pdf`);
// upload the attachment
let attachment = xeroClient.core.attachments.newAttachment({
MimeType: 'application/pdf',
FileName: `myfile.pdf`,
ContentLength: stats.size
})
return attachment.save(`/Invoices/${invoice.response.Id}`, `/tmp/myfile.pdf`)
The return is consistently this:
{ Error: POST call failed with: 401
at /user_code/node_modules/xero-node/lib/application.js:129:42
at passBackControl (/user_code/node_modules/xero-node/lib/oauth/oauth.js:400:25)
at IncomingMessage.<anonymous> (/user_code/node_modules/xero-node/lib/oauth/oauth.js:416:17)
at emitNone (events.js:91:20)
at IncomingMessage.emit (events.js:185:7)
at endReadableNT (_stream_readable.js:974:12)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickDomainCallback (internal/process/next_tick.js:122:9)
data:
{ oauth_problem: 'signature_invalid',
oauth_problem_advice: 'Failed to validate signature' } }
I've tried the endpoint using another wrapper (npm/xero) and I'm getting the same error, I'm wondering if neither support signing for attachments – or am I doing something wrong?
The text was updated successfully, but these errors were encountered:
tommaitland
changed the title
Translations returning a 401 signature_invalid error
Attachments returning a 401 signature_invalid error
Apr 26, 2017
I'm trying to use the attachment endpoints which are in this wrapper, and I'm posting this with the understanding they're not properly supported yet – but thought someone might be able to help.
I can't seem to get around this error:
I've read the code and am posting like this:
The return is consistently this:
I've tried the endpoint using another wrapper (npm/xero) and I'm getting the same error, I'm wondering if neither support signing for attachments – or am I doing something wrong?
The text was updated successfully, but these errors were encountered: