> ## Documentation Index
> Fetch the complete documentation index at: https://docs.companies.social/llms.txt
> Use this file to discover all available pages before exploring further.

# Get whoami



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/companies.social/openapi.documented.yml get /whoami
openapi: 3.1.0
info:
  title: companies.social API
  version: 1.0.0
  description: Company social graph API
servers: []
security: []
paths:
  /whoami:
    get:
      responses:
        '200':
          description: Current authenticated user
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  email:
                    type: string
                  name:
                    type: string
                  plan:
                    type: string
                  createdAt:
                    type: string
                required:
                  - id
                  - email
                  - name
                  - plan
                  - createdAt
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
      security:
        - apiKey: []
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import CompaniesSocial from '@alloy.rest/companies.social';

            const client = new CompaniesSocial({
              apiKey: process.env['COMPANIES_SOCIAL_API_KEY'], // This is the default and can be omitted
            });

            const whoami = await client.whoami.retrieve();

            console.log(whoami.id);
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/alloy-rest/companies.social-sdk-go\"\n\t\"github.com/alloy-rest/companies.social-sdk-go/option\"\n)\n\nfunc main() {\n\tclient := companiessocial.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\twhoami, err := client.Whoami.Get(context.TODO())\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", whoami.ID)\n}\n"
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: API key for authentication

````