Closed christiannguyen closed 6 years ago
const ewsConfig = { username: 'myusernamehere', password: 'mypassword', host: 'https://outlook.office365.com', auth: 'basic' }; // initialize node-ews const ews = new EWS(ewsConfig); // define ews api function const ewsFunction = 'GetFolder'; const ewsArgs = { 'FolderShape': { 'BaseShape': 'default' }, 'FolderIds': { 'DistinguishedFolderId': { 'attributes': { 'Id': 'inbox' }, } } } ews.run(ewsFunction, ewsArgs) .then(result => { console.log("RESULT HERE", result); console.log(JSON.stringify(result)); }) .catch(err => { console.log(err.message); });
Just curious what I'm doing wrong exactly here? All i get back is a:ErrorInvalidRequest: The request is invalid. I'm pretty sure I structured the code right. Sorry if i shouldn't place this here wasn't sure where else to ask this.
a:ErrorInvalidRequest: The request is invalid.
Nevermind. I realized it was a capitalization issue with default lol. Sorry can just close it out.
Just curious what I'm doing wrong exactly here? All i get back is
a:ErrorInvalidRequest: The request is invalid.
I'm pretty sure I structured the code right. Sorry if i shouldn't place this here wasn't sure where else to ask this.