6
for developers: help me with /user backend!
(lemmy.world)
you can find your user info in the /api/v3/site response. the /api/v3/user endpoint requires a name or person id.
i recommend checking out https://join-lemmy.org/api/classes/LemmyHttp.html
I see this has already been answered, but I'll post what I was typing out anyway.
It's not enough to just provide your auth token if you want to fetch the details for yourself (even though the JWT decodes to identify you). You have to use /user like you would for fetching anyone else, e.g.:
curl --header 'accept: application/json' --header 'authorization: Bearer xyzyzyz' --location https://lemmy.world/api/v3/user?username=okelote360 | jq .
Support / questions about Lemmy.