API Get User By Associated Account ID

Hey everyone, I’m still pretty new to using Discourse to serve as the central form of communication for my community and was just unsure how to go about certain things.

I’ll explain what I’m trying to do so you can get a better understanding.

So, my community is gaming oriented and I want to use Discourse as a source of user management for all parts of my community. I am attempting to synchronize ranks from Discourse to a Steam game server for users that have signed in with Steam.

How would I look up a user by the Steam ID efficiently with the Discourse API, so I can get their groups? Any guidance would be appreciated! I am pretty familiar with using APIs, but I just cannot figure out if this would be readily doable or what the best approach for me is going to be.

I would like to do this also. I don’t have an answer, but see the following:

You can download a csv file that contains both user id and external id from /admin/users/list/active, Export. That’s not an API call but maybe it would help.

1 Like

Yeah, that’s definitely a step in the right direction. I’m just not seeing any way to do a query via the API to look up a person via an external identified. Ideally I want to be able to do it using both Discord IDs and Steam IDs, but I’m hoping to get Steam IDs sorted out first.

You should be able to use this for both Discord and Steam logins:

3 Likes

Thank you so much, I just tested that, and it worked exactly as I needed it to! Now I’ll just need to write the in-game implementation.

1 Like