~~Could you provide a link to the documentation for the endpoint you want to access? I can’t find it. My guess is that you need to fetch a specific user via ${api}/user/124356
.~~
Docs here. My guess is wrong.
God, that documentation is annoying to read. I revise my revised opinion. Try providing a user ID or a username as query parameters in your API call.
const response = await fetch(`${api}/user?person_id=123456`, {
method: "GET",
headers: {
"Content-Type": "application/json",
"Authorization": `Bearer ${lemmyToken}`
}
});