Problem with managing tokens/licensing

Dear Atlassian Community,

we have a problem regarding testing different types of tokens/licencing states.
We have an add-on published as private on our vendor account. After generating the token, we install the add-on on another instance of Jira using generated token. Everything works just fine, but we also want to test different types/states of licences.
According to Atlassian website:

Now you can test your app, modify its license states (if it’s paid), or manage the token. To test, set the license state to the one you want. From the License status menu, choose the state you’d like to test - active trial, subscription, inactive subscription, etc.

We are however missing this functionality (license status) in instance, on which the addon is installed and activated via token. The only modification to installed adon is actually uninstallig and adding new. No licences management options
Are we missing something ?
Thank you and best regards !

I’m assuming Cloud?

Firstly make sure you have "enableLicensing": true in the atlassian-connect.json

Then as far as I know there are two ways to check license status (which of course the docs don’t tell you).

  1. Check for ?lic=active in the URL query
  2. AP.context.getContext(response => console.log(response.license))

Neither of those will tell you the specific license type, only if it’s active or not.

Copying across the insights from this comment:

AP.context.getContext(context => {
  if (context.license && {
    // Active trial | Active subscription | Cancelled subscription
  } else {
    // Unlicensed | Inactive trial | Inactive subscription

Where he says “Cancelled subscription remains active license until the end of the billing period, at which point it reverts to Unlicensed

Hope that helps :slight_smile:

Hi @AdrianCzerwonka,

It sounds like you need to ‘enable private listings’ in the Jira instance you wish to test on (otherwise the option to change license status won’t appear).

To do this:

  1. In the Jira instance, go to the “Manage Apps” page in the admin settings
  2. Click the Settings link at the bottom
  3. Check the “Enable Private Listings” option.

Once you have done this, when you look at the installed add-on (also in the Manage Apps page) you should see the dropdown to choose between the different license states.

Hope this helps.

Hello @nathanwaters,
hello @scottohara,

thank you very much for your feedback.
We have enabled private listing and “enableLicensing”: true and have succedeed.
We are now fiddling with API and different statuses vs lic=active as you have Nathan proposed.

thank you !

1 Like