से टोकन प्राप्त करने में असमर्थ मैं कार्यालय 365 कैलेंडर एपीआई से टोकन प्राप्त करने में सक्षम नहीं हूं, पिछले 7 से 8 महीनों में यह काम कर रहा था लेकिन अचानक मुझे त्रुटि मिल रही है "एक सरणी या एक अस्थिर वस्तु की उम्मीद है लेकिन मिल गया [ऑब्जेक्ट नल] "।oauth2 office365 कैलेंडर एपीआई
तुम लोग मेरी कोड यहाँ
var oauth2 = require("simple-oauth2")(ConfigOutlookCredentials);
var scopes = ["openid","offline_access","profile", //here 'profile' is added bz not able to getting EmailId in this function getEmailFromIdToken.
"https://outlook.office.com/mail.read",
"https://outlook.office.com/calendars.readwrite"
];
function getTokenFromCode(auth_code,callback) {
logger.MessageQueueLog.log("info","auth_code: "+auth_code+" || redirectUri: "+redirectUri+" || scopes: "+scopes);
oauth2.authCode.getToken({
code: auth_code,
redirect_uri: redirectUri,
scope: scopes.join(" ")
}, function(error, result) {
logger.MessageQueueLog.log("info","error: "+util.format('%j',error.message)+" || result: "+util.format('%j',result));
if (error) {
return callback(error,null);
} else {
var token = oauth2.accessToken.create(result);
return callback(null,token);
}
});
}
मैं अपने rediredct यूआरएल और एक ही कोड "getTokenFromCode" ऊपर कार्य करने के लिए पारित करने के लिए पुनः निर्देशित करने के बाद कोड हो रही है देख सकते हैं, फिर भी मैं त्रुटि यानी "एक उम्मीद हो रही हूँ सरणी या एक पुनरावृत्त वस्तु लेकिन प्राप्त [ऑब्जेक्ट नल] "।
कृपया मुझे समस्या का पता लगाने में मदद करें। अग्रिम में धन्यवाद।