Public project API does not return existing projects

The following API should return all the projects that are owned by the member:
https://gitlab.com/api/v4/users/777763/projects?visibility=public

This specific API requests returns an empty list, even though you can navigate to the member’s repositories and see them all here: Luke Wilk · GitLab.
That public repository can even be retrieved via API (https://gitlab.com/api/v4/projects/8830194).

Am I using the public project API incorrectly?
Thanks

On Projects API | GitLab the example request does mention a token:

curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/users/5/starred_projects"

So it might be that a valid user session is required to do such requests.

Sorry that I didn’t mention it.
I am using an authenticated session for all the requests I mentioned in my original post.

When I test it, I get only the personal projects, which probably is why you get an empty list. Not sure how you would get the whole list.
Not sure, but it could be a bug, as the API documents seem to indicate that you should also be able to get other projects (like the starred projects, why would you star your own project :slight_smile: ).

@ilia-cy you have wrong user_id. Your user_id is 2974822 which is working just fine:
See: https://gitlab.com/api/v4/users/2974822/projects?visibility=public

You can check how to get your user_id here: https://forum.gitlab.com/t/where-is-my-user-id-in-gitlab-com/7912

I’m querying for projects owned by another user.
Their projects should be accessible since I’m able to see them via the user interface via the link I shared above.

user_id of user Luke Wilk with username lwilk is 2974822 not 777763 as you have in your request.

Looks like @balonik is right that you got the wrong user.

You can search and get the user id with this call (which shows lwilk => 2974822, not the 777763)
https://gitlab.com/api/v4/users?username=lwilk

Which does show the (current) singular project.
https://gitlab.com/api/v4/users/2974822/projects?visibility=public

For bonus points, you can also use the full path/name as namespaced path encoding (works with projects too :slight_smile: )
https://gitlab.com/api/v4/users/lwilk/projects?visibility=public