Skip to main content

How to Create API Keys

How to Create API Keys in the API Portal


Introduction

Key authentication for APIs is the default method in Traefik Hub to authenticate and authorize access to APIs.

For more information about how to set up API keys, please refer to the Key authentication documentation.


Set Up Keys

In Traefik Hub, you configure API keys for authentication through API Portals.

info

The tokens are tied to the user. If you add a key on one portal, it will appear on other portals, even on other agents.

First, log into an API Portal and select Applications from the menu at the top. The Applications page displays the list of applications associated with the APIs in the portal.

https://portal.example.com/applications
Applications list in the API portalApplications list in the API portal

Select the application for which you want an API key. Click Create API key from the API keys section. Enter a name for the token, and select Create.

https://portal.example.com/applications
Create token buttonCreate token button
https://portal.example.com/applications
Create token pop-up windowCreate token pop-up window

As soon as you click Create, the API key is displayed. Copy and save it as it cannot be retreived again. After you've copied it, click Ok, got it.

https://portal.example.com/applications
Copy API keyCopy API key

Your new key is created and displayed in the API keys section.