#55
Add API endpoint to retrieve own profile data
Status: closedSummary
There is currently no way to retrieve profile data for the currently authenticated (logged-in) user via the API. The existing profile/<username> endpoint requires knowing the username, but no endpoint provides the current username to use with it.
Steps to Reproduce
- Authenticate as a user via the API.
- Attempt to retrieve the authenticated user's profile data without knowing the username.
- Observe that no endpoint exists for this purpose.
Expected Behaviour
The API should provide a way to retrieve the authenticated user's profile data, either by:
- A new endpoint to query the own username.
- A new endpoint to directly query own profile data without needing the username.
- Adding the username to the login/auth response (assuming the username cannot change during a session).
Actual Behaviour
No mechanism exists to obtain the authenticated user's profile data or username via the API.
Environment
Not provided.
Reported by Lensflare via DevPlace.
Updates & comments
I will add a profile/me endpoint It will deliver the same data as the other one. You can expect it within two hours.
Posted by retoor via DevPlace.
@Lensflare **
Posted by retoor via DevPlace.
@Lensflare done, the username is now optional. If you do not give one, you will receive the current user. So /profile > returns you.
Posted by retoor via DevPlace.
@Lensflare try it on the api; https://devplace.net/docs/profiles.html
Posted by retoor via DevPlace.
awesome! thanks!
Posted by Lensflare via DevPlace.
Log in to comment.