Is there a way to simulate non evaluation license?

On our app we are using the “GET /rest/atlassian-connect/1/addons/{appKey}” API to check whether a user has purchased our app or he’s on the trial period. We are trying to test it using an access token, but even when we set the “Access token status” to “Active subscription” the API above returns evaluation=true.

Is there a way for us, as the app developers, to simulate a user who isn’t on a trial period?

Hey @TomKeidar
As Atlassian guys wrote it on their pages, testing this stuff is not really simple…

You can test licensing-related behavior of your app in a local, development environment to an extent. But there’s no way to replicate the interaction with the UPM and Atlassian Marketplace in a local environment alone. In the production environment, the Atlassian Marketplace serves licenses for new subscribers, and the application interacts with the Marketplace to get the license state.

That is what we did, we just managed req.allowed based on the environment the app was runing on and req.query.lic status. If you want to change license states, you would have to add your addon to private marketplace to generate access token

Installing apps with access tokens
After generating the token, you can use the token URL to install the app and apply the token in the same process:

  1. Copy your token link from your Private listings page in Marketplace.
  2. Log into the cloud instance where you want to install your app.
  3. Go to Manage apps in the administration console.
  4. Click Settings at the bottom of the page.
  5. Check the box to Enable private listings .
  6. Back in the Manage apps page, click Upload app .
  7. Paste the URL of your descriptor from the Marketplace, and click Upload .
    Your descriptor is retrieved and installed, and your token is applied. You should see an “Installed and ready to go!” dialog.
    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.

One thing to mention here, be careful when uploading to private listing because of the app keys. Apps from private listings can only be removed by filling out the tickets to Atlassian… They are fast tho… :smiley: :+1:
Hope it helped