0

I have been trying to setup Jenkins api token so that I can use it tin python codes.

Is there any expiry for the Jenkins api token created via the UI.

Dennis
  • 21
  • 1
  • 3

2 Answers2

1

There is no time limit set for the expiry of the Jenkins API token. However, the best practice is to keep on changing after a long period change to avoid security risk.

You can find more about Jenkins API token here in this blog

Sourav
  • 3,025
  • 2
  • 13
  • 29
0

Just wanted to put this out there for anyone having a problem with their token disappearing. The API token does not expire, but it can get wiped out on some Jenkins controllers.

We use CloudBees SDA, and I discovered after many iterations of creating and losing my token that the token has to be generated at the Operations Center level rather than the Client Controller level, because the latter gets synched to the former periodically (at least the way we have it configured).

See here for more information.

Pat Jones
  • 876
  • 8
  • 18