Resolving user_id to username

Hey, I wanted to avoid using a username as a unique identifier for a channel as it is known for some channels to receive name changes. So using the user_id parameter seems to be the correct thing to do, however I am yet to find a way to resolve this into a username or use the kraken api to request user data using it. Does anyone have any pointers as to my next step? Thanks :smile:

Honestly, I would recommend using your own unique identifier rather than relying on something from our API. That’ll be the most foolproof long-term. What are you trying to accomplish that needs something from our API to be canonical?

@DallasNChains It would be to keep track of a channel even through name changes. The channel ID never changes, but the name can. (Name changes don’t happen very often, but sometimes they do.)

@TangoChicken I believe the overall direction is to use IDs instead of names (as seen by ID parameters in IRC message tags and most new undocumented APIs), but that time for 3rd party apps isn’t here yet. Like I said, name changes don’t happen often so you shouldn’t be too worried about it just yet. Detecting that one has happened and manually updating the name is less of a task than it is for staff to do the name change.

@DallasNChains I am using my own uid but needed a way to keep track of the channel owned by my users, using the id seemed to be the right thing to do. So @3ventic you were absolutely correct, I think I’ll store both the name and id considering I’ve already built it around the ids, if anything it can only help with future-proofing. Thank you both.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.