The required Permissions can be found in our Docs here:
https://docs.snyk.io/features/integrations/git-repository-scm-integrations
Github
curl -XGET -H 'authorization: token <personal token>' '<https://api.github.com/repos/><owner>/<repo>'
Github Enterprise
curl -XGET -H 'authorization: token <personal token>' 'https://<GHE url>/api/v3/repos/<owner>/<repo>'
Gitlab
curl -XGET -H 'private-token: <token>' 'http://<Gitlab url>/api/v4/projects/<project id>'
Azure Repos
curl -XGET -u 'PAT:<token>' -H 'X-TFS-FedAuthRedirect: Suppress' '<https://dev.azure.com/><organization>/<project>/_apis/git/repositories/<repositoryId>'
Bitbucket Server
curl -XGET -u '<username:password>' 'https://<BBS url>/rest/api/1.0/projects/<projectKey>/repos/<repositorySlug>'
Bitbucket Cloud
curl -XGET -u '<username:app_password>' <https://api.bitbucket.org/2.0/repositories/><workspace>/<repo_slug>