How to get the API token for Jenkins

Since Jenkins 2.129 the API token configuration has changed:

You can now have multiple tokens and name them. They can be revoked individually.

  1. Log in to Jenkins.
  2. Click you name (upper-right corner).
  3. Click Configure (left-side menu).
  4. Use “Add new Token” button to generate a new one then name it.
  5. You must copy the token when you generate it as you cannot view the token afterwards.
  6. Revoke old tokens when no longer needed.

Before Jenkins 2.129: Show the API token as follows:

  1. Log in to Jenkins.
  2. Click your name (upper-right corner).
  3. Click Configure (left-side menu).
  4. Click Show API Token.

The API token is revealed.

You can change the token by clicking the Change API Token button.

Leave a Comment