I am writing a java program that retrieves file contents from our github repository. In reading github documentaion to retrieve a file i must hit this github endpoint
the question I have is what to substitute for owner. Let’s say my personal github user is mike but the owner of the github repository is acme. The first GET path pasted below works in my program. I am able to retrieve the file content with no issues. If I try to substitute mike for acme the path below does not work. I understand why it is not successful because that url path does not exist in github. Does that mean the API token I generate for mike cannot be used to retrieve the content in the repository owned by acme? Or can I retrieve content using the mike api token even though mike is not the owner for the acme repository (but has access to it)? The repository in question " java-repo" that has many contributors. Does this mean there can only be one user that accesses the repository in this case acme via the api’s?
GET /repost/acme/java-repo/contents/file-path.java – works
GET /repost/mike/java-repo/contents/file-path.java – does not work