I am trying to fetch list of installations from github.
I have generated an access-token as mentioned in given documentation. https://docs.github.com/en/developers/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps#2-users-are-redirected-back-to-your-site-by-github
Now I am using same access-token to call installations api as below API. (passing Authentication value as "Bearer ".
https://api.github.com/user/installations
Such information is given in the following link. https://docs.github.com/en/developers/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps#check-which-installations-resources-a-user-can-access
When I try to hit installations api, it given following error:
You must authenticate with an access token authorized to a GitHub App in order to list installations
Basically I am trying to achieve following steps given the the docs: https://docs.github.com/en/developers/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps#web-application-flow and https://docs.github.com/en/rest/reference/apps#list-app-installations-accessible-to-the-user-access-token