How to know the license status of an application created with forge?

I have an application in forge that has a license and is in production, I am using the following command view.getContext() to get the license status, but it does not show the value in console. Is there any way to know what is the license status through code.

According to https://developer.atlassian.com/platform/forge/custom-ui-bridge/view/#getcontext:

  • license: Specifies whether or not a paid app is licensed within the current installation context. Note, this field is only present for paid apps in the production environment. For free apps, apps not listed on the Atlassian Marketplace, and apps in development and staging environments, license is undefined.

Which forge app are you talking about?

Or you can try the License API: License API for cloud apps

Thank you for your answer. The application is in production and with the license parameter set to true, at the moment it is in the evaluation period, but I can’t get the information regarding the license. The result of the view.getContext() does not show the license field. The License API works with forge apps?

The Forge licensing api is limited. You either get that an app is licensed or it’s not. There is unfortunatley no other information to be gleamed. If you’re looking for more information about the license - you’ll probably want to promote your app to Connect.

1 Like

Hi @CristinaBalczar

If you’re just looking if the app has a license or not I would recommend the example provided here.

Let me know if you have any problems with this approach.

1 Like