OAuth2 App authentication for REST API

Hi,
We are creating REST API to query GitHub repo (with No UI). Can the REST api authenticate to GitHub using OAuth2 App to call GitHub’s API or is the only option to authenticate is Personal Access Token?

Thanks