Overview
This endpoint lists the contents of a specific folder within a repository accessible via a viewer token. It enables navigation through the directory structure.Endpoint
Path Parameters
The unique viewer token that grants access to the repository
Query Parameters
The folder path within the repository (e.g., “src/handlers”). If omitted, returns root contents.
How It Works
- Token is extracted from URL
- Folder path is read from query parameters
- Link validity is verified
- Expiration and view count limits are checked
- Folder contents are fetched from GitHub
- Contents array is returned as JSON
Response
Returns the raw GitHub API response containing folder contents.Name of the file or subdirectory
Full path within the repository
Either “file” or “dir”
Size in bytes (for files)
Git SHA hash of the content
GitHub API URL for this item
GitHub web URL for this item
Git API URL for this item
Direct download URL (for files)
Example Request
Example Response
Error Responses
Missing token - No token provided in URL
Invalid viewer link - Token not found in database
Link expired or view limit reached - Token has expired or max views exceeded
Errors from GitHub API if the folder cannot be accessed
Use Case
When a recruiter clicks on a folder in the repository browser, this endpoint fetches the folder’s contents, allowing them to navigate deeper into the project structure.Notes
- Response is directly proxied from GitHub API
- Content-Type is set to
application/json - View count is NOT incremented on folder views (only on initial repo access)