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) {


	var reqLicense = req.context.license;

//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: ‘’,
hostBaseUrl: ‘’,
hostUrl: ‘’,
hostStylesheetUrl: ‘/atlassian-connect/all-debug.css’,
hostScriptUrl: ‘

Please help me in resolving it.

Thanks in Advance!

Best regards,
Pavan G

This post helped me …