Req.context.license is returning 'undefined' while checking in index.js file

Hi Community Experts,

req.context.license is returning ‘undefined’ while checking in routes/index.js file

Environment : Confluence Cloud

Following is the code:

app.get(‘/test.xml’, function (req, res) {

            console.log(req);

	var reqLicense = req.context.license;
            console.log(reqLicense)

//Action depending on reqLicense

};

I have enabled Private Listing and Applied Token, changed the subscription to all values … following is the Context from req from Confluence Cloud

context: {
http: null,
title: ‘xxxx’,
addonKey: ‘xxx’,
clientKey: ‘’,
token: ‘’,
license: undefined,
localBaseUrl: ‘https://9xxx.ngrok.io/’,
hostBaseUrl: ‘’,
hostUrl: ‘’,
hostStylesheetUrl: ‘/atlassian-connect/all-debug.css’,
hostScriptUrl: ‘https://connect-cdn.atl-paas.net/all.js
},

Please help me in resolving it.

Thanks in Advance!

Best regards,
Pavan G

This post helped me …