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.
## Summary
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
1. Authenticate as a user via the API.
2. Attempt to retrieve the authenticated user's profile data without knowing the username.
3. 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.*
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.
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 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 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.*
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
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
Expected Behaviour
The API should provide a way to retrieve the authenticated user's profile data, either by:
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.
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.