Is there an endpoint to get the user’s avatar URL?
إعجاب واحد (1)
Call https://meta.discourse.org/u/falco.json
and check .user.avatar_template
4 إعجابات
Checked
So there is no endpoint for getting the avatar. I have to first reach the user information and then craft something for getting the image URL based on some size?
I was expecting to find something like /users/{user_id}/avatar.json.
إعجاب واحد (1)
Looks like it. What problem are you trying to solve? You want to use the Discourse avatar on some other site?
إعجاب واحد (1)
Yup, that is exactly the case. There are other subdomains holding other apps and we wanted to use the Discourse avatar on them
إعجاب واحد (1)
If you put a 1 for the filename, it gets the latest. 100 is the size. It can be anything
https//meta.discourse.org/user_avatar/meta.discourse.org/pastawhiskey/100/1.png