Env:CIRCLE_USERNAME empty during API build trigger

According to the documentation, CIRCLE_USERNAME is “The GitHub login of the user who either pushed the code to GitHub or triggered the build from the UI/API”

But when triggering a build using the API, I think the environment variable CIRCLE_USERNAME is empty.

1 Like

Did you use an API token generated in your Account settings? Do you have a public project where this could be reproduced? Thanks.

Sure, I used the API to trigger a build of this project:


I used a token generated in the admin UI with access to ‘All’.

And I wasn’t able to see a username env variable. It does appear when built from the UI or a github push, though.

1 Like