Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

propero1's avatar

GitHub API

Hi. I need to implement GitHub API in my Laravel 8 project. User should be able to authorize with his GitHub account, where he can choose his repository (private or public). And then I need to display the Issues related to that repository on my Laravel site.

The problem here is that I do not really know how to start and I don't find any examples that would show me how to do it.

I've found some repositories:

  • GrahamCampbell/Laravel-GitHub
  • mckenziearts/laravel-oauth
  • socialite But I really do not know what would be the best approach.

I've got two links for reference that I need to use. github /rest/reference/issues github developers/apps/building-oauth-apps/authorizing-oauth-apps (Sorry I coudnt include links)

Thank you all for tips and help in advance:)

0 likes
3 replies
martinbean's avatar

@propero1 We can’t hold your hand in this.

You’ll need to read GitHub API docs and identify the API endpoints that will give you the data you need. You’ll then need to select a PHP SDK (you’ve already identified a couple) to make requests to GitHub API.

1 like
propero1's avatar

@martinbean Thank you for answer. It actually helped a little bit. I am going to try socialite nad read the docs again. :)

martinbean's avatar

@propero1 Socialite is for interacting with OAuth services. So it will enable you to get an OAuth access token for a user’s GitHub account. You’d then use that access token to interact with the GitHub API as that user.

Please or to participate in this conversation.