Is it possible to get approver from deploy step in pipeline

Hi! I have a pipeline in which deploy is preceded by a hold step.

In the deploy step I’d like to know WHO approved the deploy. I have made a script that calls the v2 API, first /workflow/:id/job, then /user/:id - this works exactly the way I want.

However, as is written several places, the v2 API can only use personal tokens (and the v1 API does not give me the necessary info).

Are there any other ways of achieving this? As the API calls come from within Circleci, one could imagine that there are other ways to secure the communication/authorise/authenticate the user.

And if not - can this info be fetched by scripts in the pipeline in any other way?

To be clear you’re already able to retrieve the right information using your personal access token but you’re looking to run code you wrote authenticated by some other means, right?

If that’s the case have you considered making a bot user in your VC provider and making the personal access token against that instead? I’m assuming that’s the only reason you’d like to avoid using a personal access token against your own user.

Or maybe I’m missing something?