Jump to content
McKay Development

Questions about licenses / packageid's


Recommended Posts

Hi There,


I've created a script to get some info about a users account. getOwnedApps() and ownsApp() is really nice but I would like to understand more about licenses and getProductInfo.





  1. How do we know what this package is? Is there anyway to look it up?
client.on('licenses', (licenses) => {

Returns the below. 

{ package_id: 15740,
  time_created: 1487406101,
  time_next_process: 0,
  minute_limit: 0,
  minutes_used: 0,
  payment_method: 1,
  flags: 0,
  purchase_country_code: 'AU',
  license_type: 1,
  territory_code: 55,
  change_number: 1796623,
  owner_id: 633543528,
  initial_period: 0,
  initial_time_unit: 0,
  renewal_period: 0,
  renewal_time_unit: 0 }



  1. What are all the object responses in appinfo?
function getProd(){


{ '730': 
   { changenumber: 2713931,
     missingToken: false,
      { appid: '730',
        common: [Object],
        extended: [Object],
        config: [Object],
        install: [Object],
        depots: [Object],
        ufs: [Object] } } }
Link to comment
Share on other sites

That license grants you access to package 15740. You can get info about a package using getProductInfo's second argument. A package contains one or more apps, so if you want to translate a license into an app name then you need to lookup the package and then lookup the apps contained in that package.


Use JSON.stringify to get full details for an object, or alternatively call console.log on a lower level (e.g. console.log(res[730].appinfo)).

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...