# Auth

## Get Authentication Info

`client.auth.retrieveInfo(RequestOptionsoptions?): AuthRetrieveInfoResponse`

**get** `/auth/info`

Returns information about the authentication credentials being used to access the API

### Returns

- `AuthRetrieveInfoResponse`

  - `apiKey: APIKey`

    Information about the API key credentials

    - `created: string`

      When the client credentials were created

    - `issuing_user: IssuingUser`

      Information about the user who created the credentials

      - `id: string`

        The user ID

      - `email: string`

        The user's email

      - `name: string`

        The user's name

    - `name: string`

      The name of the credential

    - `project: Project`

      Information about the project

      - `id: string`

        The project ID

      - `name: string`

        The name of the project

      - `plan_type: string`

        The plan type for the project

    - `public_key: string`

      The public key of the client credentials

  - `type: "apiKey"`

    The type of authentication being used

    - `"apiKey"`

### Example

```typescript
import TigerCloud from 'tiger-cloud';

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

const response = await client.auth.retrieveInfo();

console.log(response.apiKey);
```

#### Response

```json
{
  "apiKey": {
    "created": "2024-01-15T10:30:00Z",
    "issuing_user": {
      "id": "user123",
      "email": "john.doe@example.com",
      "name": "John Doe"
    },
    "name": "my-production-token",
    "project": {
      "id": "rp1pz7uyae",
      "name": "My Production Project",
      "plan_type": "FREE"
    },
    "public_key": "tskey_abc123"
  },
  "type": "apiKey"
}
```

## Domain Types

### Auth Retrieve Info Response

- `AuthRetrieveInfoResponse`

  - `apiKey: APIKey`

    Information about the API key credentials

    - `created: string`

      When the client credentials were created

    - `issuing_user: IssuingUser`

      Information about the user who created the credentials

      - `id: string`

        The user ID

      - `email: string`

        The user's email

      - `name: string`

        The user's name

    - `name: string`

      The name of the credential

    - `project: Project`

      Information about the project

      - `id: string`

        The project ID

      - `name: string`

        The name of the project

      - `plan_type: string`

        The plan type for the project

    - `public_key: string`

      The public key of the client credentials

  - `type: "apiKey"`

    The type of authentication being used

    - `"apiKey"`
