Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Getting an Itch.io user's username/info from his ID?

A topic by mid created Dec 09, 2017 Views: 2,614 Replies: 3
Viewing posts 1 to 4
(3 edits) (+1)

Me again, :|

The idea for stuff sort of like leaderboards, if the user's name changes, I'd like it to update on the leaderboard.

Maybe by creating a new API endpoint?
If practical, maybe it can also be extended to other user information?
This would be an amazing feature for multiplayer games that depend on Itch.io's APIs.

This is currently not an issue for the game I am making, however it will be one for sure in the future, seeing as it's multiplayer.

(+2)

API endpoints for this stuff actually do exist, just not documented :) For example, to get user's info, perform simple GET request:

curl https://itch.io/api/1/<YOUR_API_TOKEN>/users/<USER_ID>

For user_id=1 the result is:

{"user":{"url":"https:\/\/leafo.itch.io","username":"leafo","id":1,"cover_url":"https:\/\/img.itch.zone\/aW1hZ2UyL3VzZXIvMS8zODEzNi5wbmc=\/100x100%23\/fsSoF5.png"}}

You can find other APIs in the itch client's code https://github.com/itchio/itch/blob/master/src/api/index.ts . Obviously no guarantee that it will work in future. Would be very nice if these APIs were officially supported and documented.

Wow, thank you so much for this

Admin(+1)

Sorry about them not being documented. We haven't fully standardized the API that we're publishing yet, but that user API call should be stable.

This topic has been auto-archived and can no longer be posted in because there haven't been any posts in a while.