Envato API - How to get the user's ID?

For a project I’m working on, I need a way to identify a user even if they change their username and email (using the Envato API).

I can’t find any endpoints that provide the user’s ID. It only provides this information if they’re a buyer, but everyone who uses the project I’m working on likely will not be a buyer. ^^

Anyone have any suggestions?

Edit: September 5 2019

There is now an official and undocumented way to get the ID of a user who authenticates with OAuth or by personal token via this endpoint: GET https://api.envato.com/whoami

The response looks like this:

{
    "clientId": null,
    "userId": 1908998,
    "scopes": [
            "default"
            "sale:history"
            "user:favourite_collection_add"
            "user:account"
    ],
    "ttl": 315360000
}
  • clientId only applies to OAuth sessions and will be the ID of your app (e.g. "test-0ywpcsp8").
  • scopes is an array of permissions enabled in the session.
  • ttl is the number of seconds before the session expires (up to 3600 for OAuth, always 315360000 for personal tokens).
1 Like