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

# Authentication

> Learn how to authenticate with Topsort APIs using a bearer token

Topsort's APIs are authenticated via bearer tokens. Requests must include an authorization header containing an API key. If this header is missing or invalid, the HTTP response code will be `401 Unauthorized`.

```sh theme={null}
POST /v2/auctions HTTP/2
Host: app.topsort.com
...
Authorization: Bearer <YOUR-API-KEY>
...
```

## Obtaining an API Key

By this point we will have provided you with credentials for our Auction manager. Visit the [Auction Manager: API Integration](https://app.topsort.com/new/en-US/marketplace/account-settings/api-integration) page to generate your API keys.

<Steps>
  <Step title="Access API Integration">
    Access the Topsort API Integration page by clicking on **Settings**, and then selecting **API Integration**.

    <img src="https://mintcdn.com/topsort/1RZV69Uhic79Ylqv/en/api-reference/api-integration.webp?fit=max&auto=format&n=1RZV69Uhic79Ylqv&q=85&s=e19797f616a2e18801a0642eb7f4c5b3" alt="Screenshot" width="446" height="583" data-path="en/api-reference/api-integration.webp" />
  </Step>

  <Step title="Generate API Key">
    Generate an API key by pressing the **Generate API key** button.

    Note that there are two different types of keys: Marketplace API keys and Advanced API keys.

    In order to access the `/auctions` and `/events` endpoints, you must create a Marketplace API key. For all other APIs, you need an Advanced API key.

    <img src="https://mintcdn.com/topsort/1RZV69Uhic79Ylqv/en/api-reference/generate-api-key.webp?fit=max&auto=format&n=1RZV69Uhic79Ylqv&q=85&s=225f3845362b2e5f8aded8b54ed9f715" alt="Screenshot" width="1594" height="596" data-path="en/api-reference/generate-api-key.webp" />
  </Step>

  <Step title="Copy Key">
    Click on the **Copy key** button to the right of the newly generated token to copy it to your clipboard.

    <img src="https://mintcdn.com/topsort/1RZV69Uhic79Ylqv/en/api-reference/copy-key.webp?fit=max&auto=format&n=1RZV69Uhic79Ylqv&q=85&s=4a97869aa674460d3d203c1fa98599c2" alt="Screenshot" width="1594" height="248" data-path="en/api-reference/copy-key.webp" />
  </Step>

  <Step title="Use API Key">
    Use the API Key on your servers.
  </Step>
</Steps>

<Warning>
  **Keep api keys secret,** this is not a public key. **Do not share it with
  your frontend or clients**. **API keys are scoped per marketplace**. If you
  have multiple marketplaces, then you will require multiple API keys.
</Warning>
