## GET /v1/identity

Read the account and identity associated with the credential.

Required permissions: none; any valid credential.
API key: Supported.
CLI user token: Supported.
Session token: Requires the ellipsis:api scope; no permissions.ellipsis grant is needed.
Higher permission levels include lower levels: read < write < delete.

### Response

```text
{
  "api_key_id": str,
  "customer_id": str,
  "customer_login": str,
  "gh_user": {
    "avatar_url": str,
    "bio": str,
    "blog": str,
    "business_plus": bool,
    "collaborators": int,
    "company": str,
    "created_at": str,
    "disk_usage": int,
    "email": str,
    "events_url": str,
    "followers": int,
    "followers_url": str,
    "following": int,
    "following_url": str,
    "gists_url": str,
    "gravatar_id": str,
    "hireable": bool,
    "html_url": str,
    "id": int,
    "ldap_dn": str,
    "location": str,
    "login": str,
    "name": str,
    "node_id": str,
    "notification_email": str,
    "organizations_url": str,
    "owned_private_repos": int,
    "plan": {
      "collaborators": int,
      "name": str,
      "private_repos": int,
      "space": int
    },
    "private_gists": int,
    "public_gists": int,
    "public_repos": int,
    "received_events_url": str,
    "repos_url": str,
    "site_admin": bool,
    "starred_url": str,
    "subscriptions_url": str,
    "total_private_repos": int,
    "twitter_username": str,
    "two_factor_authentication": bool,
    "type": str,
    "updated_at": str,
    "url": str,
    "user_view_type": str
  },
  "session_id": str,
  "user_id": str
}
```

### Python

```python
import os

from ellipsis import Ellipsis

client = Ellipsis(api_key=os.environ["ELLIPSIS_API_TOKEN"])

result = client.identity()
print(result)
```

### TypeScript

```typescript
import { Ellipsis } from '@ellipsis-dev/sdk';

const client = new Ellipsis({
  apiKey: process.env.ELLIPSIS_API_TOKEN!,
});

const result = await client.identity();
console.log(result);
```

### cURL

```bash
curl "https://api.ellipsis.dev/v1/identity" \
  -H "Authorization: Bearer $ELLIPSIS_API_TOKEN"
```

### Response schema

```json
{
  "properties": {
    "api_key_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "customer_id": {
      "type": "string"
    },
    "customer_login": {
      "type": "string"
    },
    "gh_user": {
      "anyOf": [
        {
          "properties": {
            "avatar_url": {
              "type": "string"
            },
            "bio": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "blog": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "business_plus": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ]
            },
            "collaborators": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ]
            },
            "company": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "created_at": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "disk_usage": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ]
            },
            "email": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "events_url": {
              "type": "string"
            },
            "followers": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ]
            },
            "followers_url": {
              "type": "string"
            },
            "following": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ]
            },
            "following_url": {
              "type": "string"
            },
            "gists_url": {
              "type": "string"
            },
            "gravatar_id": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "hireable": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ]
            },
            "html_url": {
              "type": "string"
            },
            "id": {
              "type": "integer"
            },
            "ldap_dn": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "location": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "login": {
              "type": "string"
            },
            "name": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "node_id": {
              "type": "string"
            },
            "notification_email": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "organizations_url": {
              "type": "string"
            },
            "owned_private_repos": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ]
            },
            "plan": {
              "anyOf": [
                {
                  "properties": {
                    "collaborators": {
                      "type": "integer"
                    },
                    "name": {
                      "type": "string"
                    },
                    "private_repos": {
                      "type": "integer"
                    },
                    "space": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "collaborators",
                    "name",
                    "space",
                    "private_repos"
                  ],
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ]
            },
            "private_gists": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ]
            },
            "public_gists": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ]
            },
            "public_repos": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ]
            },
            "received_events_url": {
              "type": "string"
            },
            "repos_url": {
              "type": "string"
            },
            "site_admin": {
              "type": "boolean"
            },
            "starred_url": {
              "type": "string"
            },
            "subscriptions_url": {
              "type": "string"
            },
            "total_private_repos": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ]
            },
            "twitter_username": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "two_factor_authentication": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": {
              "enum": [
                "User",
                "Organization",
                "Bot",
                "Mannequin"
              ],
              "type": "string"
            },
            "updated_at": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "url": {
              "type": "string"
            },
            "user_view_type": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "id",
            "login",
            "avatar_url",
            "html_url",
            "node_id",
            "url",
            "followers_url",
            "following_url",
            "gists_url",
            "starred_url",
            "subscriptions_url",
            "organizations_url",
            "repos_url",
            "events_url",
            "received_events_url",
            "site_admin"
          ],
          "type": "object"
        },
        {
          "type": "null"
        }
      ]
    },
    "session_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "user_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "customer_id",
    "customer_login",
    "user_id",
    "gh_user",
    "api_key_id",
    "session_id"
  ],
  "type": "object"
}
```
