Hello, please forgive any mistakes around terminology. I'm learning rest api usage on my own through trial and error.
I'm trying to build a Powershell module to wrap around the BitBucket API with a focus on just reading source info from repositories for use in automating CI/CD streams. I'm running into an issue with trying to hit the 2.0/repositories/{username}/{repo_slug}/src endpoint. I keep getting a forbidden response.
I'm using OAuth with a consumer. I'm authenticating with the client_credentials grant type. The consumer initially started with all repo permissions, but I also tried expanding it to include all permissions, and continued to get the error. However, I can use the same OAuth token to successfully hit the endpoint when I include the path to a particular folder or file in the repo.
I was trying to hit the endpoint from browsing the api documentation found at: https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Busername%7D/%7Brepo_slug%7D/src#get
My overall goal in trying to hit this endpoint was to explore how I can parse and iterate through api responses to build a list of available files and their paths within a repo given only the repo name.
Any help would be greatly appreciated.