Add getFile method on message attachment resource in order to download attachment with good BODY+HEADER response : ctxioClient.users(config.contextio.userId).email_accounts(config.contextio.label).folders(folder).messages(messageId).attachments(attachmentId).getFile().then(function (ctxioClientRes) {     res.set(ctxioClientRes.headers);     res.send(ctxioClientRes.body);   });
Add getFile method on message attachment resource in order to download attachment with good BODY+HEADER response :
ctxioClient.users(config.contextio.userId).email_accounts(config.contextio.label).folders(folder).messages(messageId).attachments(attachmentId).getFile().then(function (ctxioClientRes) {
    res.set(ctxioClientRes.headers);
    res.send(ctxioClientRes.body);
  });

contextio/ContextIO-node