Overview
This endpoint retrieves metadata about the repository associated with a viewer token, specifically the GitHub username of the owner and the repository name. This is useful for displaying context to the viewer.Endpoint
Path Parameters
The unique viewer token that grants access to the repository
How It Works
- Token is extracted from the URL path
- Viewer link is looked up in the database
- Associated user is retrieved
- GitHub username and repository name are returned
Response
Returns a JSON object with repository metadata.The GitHub username of the repository owner
The name of the repository being shared
Example Request
Example Response
Error Responses
Missing token - No token provided in the URL
Invalid or expired link - Token not found in database
User not found - The user associated with the viewer link no longer exists
Use Case
This endpoint is typically called by the frontend when a recruiter first accesses a viewer link. It provides the necessary information to display a header like “Viewing: johndoe/my-portfolio-project” in the UI.Notes
- This endpoint does NOT check expiration dates or view limits
- It does NOT increment the view count
- It’s a lightweight metadata endpoint for UI context
- Can be used to verify a token exists before attempting to load repository contents