Skip to content

Is there a way to get a users pins with the GitHub REST API? #24696

Is there a way to get a users pins with the GitHub REST API? #24696
Oct 3, 2021 · 1 answer

Hi, I am trying to find a way to get a users pins with the GitHub REST API, but I can’t seem to find a way.
I have tried looking at /user/{username} (Didn’t contain pins data or a URL to any) and /user/{username}/pins (404)
Is there something I am missing?

Hi @Kale-Ko

The GraphQL API usery query has field pinnedItems if its a list of repositories and gists this profile owner has pinned to their profile.

  <a href="https://docs.github.com/en/graphql/reference/objects#user" target="_blank" rel="noopener nofollow ugc">GitHub Docs</a>

Objects - GitHub Docs

Replies

1 suggested answer

Hi @Kale-Ko

The GraphQL API usery query has field pinnedItems if its a list of repositories and gists this profile owner has pinned to their profile.

  <a href="https://docs.github.com/en/graphql/reference/objects#user" target="_blank" rel="noopener nofollow ugc">GitHub Docs</a>

Objects - GitHub Docs

0 replies
Answer selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants