---
title: "Link a GitHub account to the signed-in user"
method: GET
path: "/api/auth/github/link"
tags: ["Auth"]
---

# Link a GitHub account to the signed-in user

`GET /api/auth/github/link`

## Request

- Base URL: `https://hiveship.app/api`
- URL: `https://hiveship.app/api/api/auth/github/link`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `hiveship_access`
  - HTTP bearer

Authenticated. Sets a signed state cookie (intent=link) and 302-redirects to `github.com/login/oauth/authorize`. Not callable from the Swagger UI "try-it-out" — open in a browser tab instead.

## Other responses

- `302`: Redirect to GitHub OAuth consent screen
- `401`: No session

---

[API](https://skmtc.dev/hiveship/apis/hiveship-api.md) · [All operations](https://skmtc.dev/hiveship/apis/hiveship-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hiveship/apis/hiveship-api/revisions/73d3e26544e4?raw)
