Jenkins API calls are generally made using a username/password combination, or other set of credentials.

We have a Jenkins instance using "Log in with Google" authentication, meaning no credentials are stored in Jenkins for users since login happens with OAuth. I can neither make a new user with creds of my choice, nor view my own credentials to use for the call.

I intend to build jobs using the API, so setting the Anonymous roll to be allowed to build isn't an option. If it matters, my goal is to trigger jobs via an AWS Lambda.

How do I get credentials to use for API calls?


2 Answers 2


Typically you authenticate API calls (I assume you mean HTTP REST API; there is also a Groovy API) using an API token. The API token can be generated from a user's profile page while logged in as that user (Profile page > Configure > API Token). More information about generating and using API tokens is available in the official documentation. There is also a question about API tokens posted to StackOverflow.


I would recommend using the Generic Webhook Trigger... it will allow you to specify a unique token per job and will trigger from a webhook.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.