---
title: "Import keys from GitHub profile"
method: POST
path: "/api/v1/user/ssh-keys/github-profile"
tags: ["SSH Keys"]
---

# Import keys from GitHub profile

`POST /api/v1/user/ssh-keys/github-profile`

Fetches public SSH keys from any GitHub user's profile via the unauthenticated GitHub API. Deduplicates against the user's existing keys by fingerprint.

## Request body

- GithubProfileImportRequest — Request model for importing SSH keys from a GitHub profile.
  - `github_username` string, required — GitHub username to import SSH keys from

## Response `200`

Import completed; check keys_added and errors for per-key results

- GithubProfileImportResponse — Result of importing SSH keys from a GitHub profile.
  - `github_username` string, required — GitHub username that was imported
  - `keys_added` integer, required — New keys added
  - `keys_skipped` integer, required — Keys skipped (already exist by fingerprint)
  - `errors` string[] — Per-key errors encountered

## Other responses

- `400` — GitHub user not found, API request timed out, or network error
- `401` — Not authenticated
- `422` — Validation Error

---

[API](https://skmtc.net/phala/apis/phala-cloud-api.md) · [All operations](https://skmtc.net/phala/apis/phala-cloud-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/phala/phala-cloud-api/revisions/83c6ae62e860/schema)
