This is a NuGet Package that contains a class called Entitlement with a public method called ValidAppUser. The method requires the AppId to be passed to it and will return a True/False on whether the user has purchased your app from the App Store. You can find the AppId for your app after you have started the submission process on the App Store. The user needs to be signed in to their Autodesk account through Inventor because that is where it is getting the User ID. If they are not signed in it will return false.
From what I read, they added this API with Inventor 2016 but then changed how you get the user id in Inventor 2018. So in this method it has a try/catch where it will try using the 2018 method of getting the user id but if it fails it will check using the old method so that it will support users that are not using up to date software.
NuGet Package on Nuget.org
Autodesk has switched to using Single Sign On in Inventor 2020, which caused this to stop working as it did before. As a workaround the class has been updated to force login before checking the user name. In order to do this, you need to pass the Instance of Inventor to the ValidAppUser method or use the method as an extension method of Inventor.Application.