Stable user identifier

Sort:
ajgreen

Are there any plans to add a stable user identifier? I’ve noticed that the API frequently uses usernames, and I didn’t see any obvious way of knowing when a user has changed their username. If there aren’t plans to add a stable user identifier, maybe an endpoint that allows tracking username changes would be a nice enhancement. I’ve had this problem on the website as well where I know a person’s old username and go to look them up but can’t find them because it’s changed. If I’m lucky, I can find the new username by locating a game I know I played against them and seeing what the username changed to, but that’s rather tedious.

Magnus_Chase19

+1

MakeHell_Tal

+1

Tricky_Dicky

https://api.chess.com/pub/player/{username}

  "player_id": 41, // the non-changing Chess.com ID of this player

This ID is not visible on the Web page and
there is currently no way of searching for it
So it exists but it is not much use to use as a trace after a user name change
ajgreen

Oops, RTFM. I was only looking at the output from the monthly archives at https://api.chess.com/pub/player/{username}/games/{YYYY}/{MM}, which are based on username. Seems like it would be nice to officially support looking a player up by player_id.

Nevfy

The only problem of "player_id" is that you can not directly get info about player with specific "player_id". You should scan through many of players (e.g. all players of the team) to find new username of player under question.

Moreover, chess.com can remove this field at any time.

From API manual ( https://www.chess.com/news/view/published-data-api ):

Note: the "player_id" is provided as a convenience to determine when a username has been changed. If you retrieve a Player Profile by the username-based URL linked from a Game or other object, and this new Player Profile has a "player_id" that matches a Profile you previously downloaded, then you can safely assume that this new Profile replaces the old, and all URLs with the previous username will now be found under the new username. This should be an extremely rare occurrence. This "player_id" will never change for a given account, however the future availability of this ID is not guaranteed.

kraunak60

What if he wants to let no one track?! You never know.