Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Get user_id from username?

A topic by tinspin created Aug 14, 2020 Views: 696 Replies: 2
Viewing posts 1 to 3

How would one do that?

As far as I know, the only way to get the player’s ID is by using the server-side API. To use it you must obtain a key, by either running the game from the Itch app, or by getting the player to explicitly login again and give your program the required permissions.

Ok, I guess I'll have to ask for the email address then!

I mean I would get the email form the purchases API anyway, so it would just be a matter of protecting the users interests in the GUI, typing email is alot more intrusive than typing a username.

I think adding a name parameter to the purchases API wouldn't hurt:

https://itch.io/api/1/" + key + "/game/" + game + "/purchases?name=XXX

instead of:

https://itch.io/api/1/" + key + "/game/" + game + "/purchases?email=XXX
This topic has been auto-archived and can no longer be posted in because there haven't been any posts in a while.