Node.js 使用NodeJS在outlook中创建日历事件
我需要使用NodeJS脚本在outlook中创建日历事件。我搜索了每一个地方,尝试了不同的npm软件包,但我没有找到解决方案 我尝试了节点OutlookNPM包,但文档不清楚如何创建日历事件Node.js 使用NodeJS在outlook中创建日历事件,node.js,outlook,outlook-calendar,Node.js,Outlook,Outlook Calendar,我需要使用NodeJS脚本在outlook中创建日历事件。我搜索了每一个地方,尝试了不同的npm软件包,但我没有找到解决方案 我尝试了节点OutlookNPM包,但文档不清楚如何创建日历事件 var outlook = require('node-outlook'); var newEvent = { "Subject": "Discuss the Calendar REST API", "Body": {
var outlook = require('node-outlook');
var newEvent = {
"Subject": "Discuss the Calendar REST API",
"Body": {
"ContentType": "HTML",
"Content": "I think it will meet our requirements!"
}
};
let createEventParameters = {
token: ['Access token'],
event: newEvent,
user : <user>
};
outlook.calendar.createEvents(createEventParameters, function (error, event) {
if(error) {
console.log(error);
} else {
console.log(event);
}
});
请帮助我解决这个问题,如果您知道创建日历活动的其他方法,请提出建议
谢谢尝试设置此权限
日历。读写
在Azure配置中的API权限中似乎您的访问令牌没有如预期的那样具有正确的声明,请将该令牌放到
jwt.io
上,并查找aud
字段。它给我“aud”:“00000003-0000-0000-c000-000000000000”。这是什么意思?
REST request returned 401; body: {"error":{"code":"InvalidAudience","message":"The audience claim value is invalid 'aud'.