---
title: "Get your own SSH keys"
url: https://docs.corefinity.com/api/reference/access/get-own-ssh
type: endpoint
last_updated: 2026-11-13
feature: ssh-keys
related:
  - https://docs.corefinity.com/guides/sites/access-and-security/ssh-keys.md
---
# Get your own SSH keys

Answers your personal keys, your SSH username and the environments it reaches. The first read issues your
username when your account can have one; `reason` says why not when it cannot.

```http
GET /api/user/ssh
```

- Scope: `read`
- Rate limit: 120 a minute
- Try it in the console: on

## Request

### curl

```bash
curl https://manage.corefinity.com/api/user/ssh \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json"
```

### PHP

```php
use Illuminate\Support\Facades\Http;

$response = Http::withToken(env('COREFINITY_TOKEN'))
    ->acceptJson()
    ->get('https://manage.corefinity.com/api/user/ssh');

$data = $response->json();
```

### Node

```javascript
const res = await fetch('https://manage.corefinity.com/api/user/ssh', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.COREFINITY_TOKEN}`,
    Accept: 'application/json',
  },
});

// An answer with no body (204) has nothing to parse.
const text = await res.text();
const data = text && JSON.parse(text);
```

### Python

```python
import os
import requests

res = requests.get(
    "https://manage.corefinity.com/api/user/ssh",
    headers={
        "Authorization": f"Bearer {os.environ['COREFINITY_TOKEN']}",
        "Accept": "application/json",
    },
)

data = res.json() if res.content else None
```

## Responses

### 200 Your keys and username.

```json
{
  "can_add": {
    "allowed": true,
    "refused": null
  },
  "can_have_login": true,
  "keys": [
    {
      "added_at": "2026-11-05T09:16:40+00:00",
      "added_by": {
        "former": false,
        "name": "Eleanor Finch",
        "support": false
      },
      "also_granted": [],
      "applies_to": null,
      "bits": null,
      "delivery": {
        "applied": 1,
        "not_on_new_system": 0,
        "removed": 0,
        "state": "applied",
        "total": 1,
        "waiting": 0,
        "waiting_platform_update": 0
      },
      "editable": true,
      "fingerprint": "SHA256:8LnkAlf64yNQsvTdVFxkoxM//vjpVpE8t+3gzVg1UjM",
      "id": 7306,
      "last_used_at": null,
      "layer": "user",
      "legacy": null,
      "lifecycle": "active",
      "login": "eleanor-harbourfinch",
      "name": "Eleanor's laptop",
      "owner": {
        "id": 2041,
        "name": "Eleanor Finch",
        "type": "user"
      },
      "quarantine_reason": null,
      "reach": {
        "clients": 0,
        "environments": 1,
        "websites": 1
      },
      "removable": true,
      "restricted": false,
      "restrictions": [],
      "type": "ssh-ed25519",
      "weak": false
    }
  ],
  "login": {
    "handle": "harbourfinch",
    "issued_at": "2026-11-03T10:01:58+00:00",
    "login": "eleanor-harbourfinch",
    "uid": 40118
  },
  "reach": [
    {
      "command": "ssh -p 21044 eleanor-harbourfinch@ssh-northwind.example.net",
      "environment": {
        "company": {
          "id": 1204,
          "name": "Harbour & Finch"
        },
        "id": 1311,
        "name": "Production",
        "product": "corecluster",
        "site_id": 1042,
        "website": {
          "id": 1310,
          "name": "Harbour & Finch trade"
        }
      },
      "host": "ssh-northwind.example.net",
      "port": 21044,
      "state": "ready"
    }
  ],
  "reason": null,
  "ssh_config": "Host harbourandfinch-example-com-production\n  HostName ssh-northwind.example.net\n  Port 21044\n  User eleanor-harbourfinch\n",
  "user_id": 2041
}
```

### 401 No token, or a token that is not valid.

```json
{
  "message": "Unauthenticated."
}
```

### 403 The token lacks the scope this endpoint needs. `scope` names it.

```json
{
  "code": "scope_required",
  "message": "This access token does not have the destructive scope this needs. Use a token with the destructive scope.",
  "reason": "scope_required",
  "scope": "destructive"
}
```

### 404 SSH keys are not on for your account (`feature_off`).

```json
{
  "code": "feature_off",
  "message": "Not found.",
  "reason": "feature_off"
}
```

### 429 Too many requests (`rate_limited`). Wait for the number of seconds in `Retry-After`, which `retry_after_seconds` repeats.

```json
{
  "code": "rate_limited",
  "message": "Too many requests. Try again in 60 seconds.",
  "reason": "rate_limited",
  "retry_after_seconds": 60
}
```

## If it is refused

| Status | Reason | What to do |
|---|---|---|
| 401 |  | Send a valid token as `Authorization: Bearer <token>`. |
| 403 | `scope_required` | Use a token with the scope named in `scope`. |
| 404 | `feature_off` | This feature is not on for your organisation yet. |
| 429 | `rate_limited` | Wait for the seconds in `Retry-After`. |

## The same task elsewhere

- Guide: [SSH keys](https://docs.corefinity.com/guides/sites/access-and-security/ssh-keys.md)
