Creating an API Key Quickstart
This Quickstart walks you through creating an Akeyless API Key, which can be used for programmatic access, automation, and for authenticating Akeyless Gateways or applications.
By the end of this guide, you will have:
- An Akeyless Access ID
- An Akeyless Access Key
- An Authentication Method configured to use that API Key
Prerequisites
You will need:
- An active Akeyless account
- Access to the Internet
If you do not yet have an account, complete the Creating an Akeyless Account Quickstart first.
Step 1: Sign In to the Akeyless Console
- Open the Akeyless Console: https://console.akeyless.io.
- Sign in to your existing Akeyless account.
You will be taken to the Akeyless Console homepage.
Step 2: Open the Create Authentication Method Form
- In the left navigation menu, select Users & Auth Methods.
- Select + New.
This opens the Create Authentication Method form.
Step 3: Create an API Key Authentication Method
- On the Type selection screen, select API Key.
- Select Next →.
- Enter
My API Keyin the Name field. - Select Finish to continue.
You will now see the new API Key displayed with two critical values:
- Access ID
- Access Key
Step 5: Copy and Save the Access Credentials
After the API Key is created:
- Copy the Access ID
- Copy the Access Key
Store these values securely.
The Access Key is shown only once.
If you lose it, you must create a new API Key.
Step 6: Assign Permissions
The API Key must be associated with Roles to control what it can access.
- In the left navigation menu, select Access Roles.
- Select the pre-made admin role to open the Edit Role window.
- In the Edit Role window, the General tab is selected by default.
- Select + Associate.
- In the Auth Method drop-down menu, select
/My API Key. - Select Save.
The
/added in this drop-down menu indicates thatMy API Keywas created at the root of the Items directory in your Akeyless account. You can create subdirectories to organize your Items.
You can associate My API Key with a custom role later if desired.
Step 7: Test the API Key (Optional)
You can test the API Key with the Akeyless CLI:
- Download the Akeyless CLI with a Terminal or Command Prompt.
- For Akeyless CLI Configuration:
- Type
nto skip configuring a profile. You can change this later. - Choose if you want to move the Akeyless CLI binary and if you want to create a user
PATHenvironment variable.
- Type
- Close and relaunch your Terminal or Command Prompt.
- Authenticate with the Access ID and Access Key:
akeyless auth --access-id <ACCESS-ID> --access-key <ACCESS-KEY>You should expect to see Authentication succeeded. in response to your command. You can test your access further by listing available items:
akeyless list-itemsThe output of this command should be a JSON-formatted list of all Items in your Akeyless account.
Your API Key is now ready for use in your Akeyless environment.
Updated about 5 hours ago
