Skip to main content
Admin access or an appropriate role is required to create API keys.

Generate a Harness API key

Create a personal or service account API key in the Harness platform to authenticate API requests.

1

Sign in to Harness

Sign in to your Harness account.

  • Click your profile icon in the bottom-left to go to your Profile Overview
2

Create a new API key

Under My API Keys, click + API Key to create a new key and give it a descriptive name.

3

Generate a token

Click + Token under the API key you just created.

  • Copy the token immediately and store it securely for use later.

Find your account identifier

Your account identifier uniquely identifies your Harness account.

  • Check your browser address bar when signed in to Harness.
  • Format: app.harness.io/ng/account/{ACCOUNT_ID}/...
  • Example: if your URL is https://app.harness.io/ng/account/abc123DEF456/home/get-started, your account identifier is abc123DEF456

Linking the Account from the Hub

1

Navigate to the Hub

Use one of the three Linking Account Methods to access the Hub.
2

Fill out the fields

Fill out the following fields using details from your provider:
  • API Key
  • Account Identifier
3

Connect

  • Click Connect
  • If applicable, the provider will redirect you to a sign-in or authorization page. Complete the provider’s authorization flow.
  • Once authorization is successful, you will see a confirmation popup

If the account linking is successful, you will see the newly linked account in your Accounts page.