POST /generate-viewer-link
Generates a secure viewer link that allows temporary access to a private GitHub repository. The link includes configurable expiration time and view limits.Authentication
Requires JWT authentication token in the Authorization header.Request Body
The name of the GitHub repository to share (without username/org prefix)
Number of days until the link expires. Defaults to 3 days if not provided or if value is 0 or negative.
Maximum number of times the link can be accessed. Set to 0 or omit for unlimited views.
Response
The generated viewer URL that can be shared to grant repository access
Example Request
Example Response
Status Codes
201 Created- Viewer link successfully generated400 Bad Request- Invalid input (missing repo_name or invalid JSON)401 Unauthorized- Missing or invalid authentication token404 Not Found- Repository not found or inaccessible500 Internal Server Error- Failed to create viewer link in database
Notes
- The endpoint verifies that the repository exists and is accessible before creating the link
- The repository must belong to the authenticated user
- Generated tokens are cryptographically secure and unique
- Each link is associated with the authenticated user’s account