Access Admin API from within a custom SPI

Hi guys!

I’m currently working on MFA SPI for my KeyCloak project. I’ve added the MFA, but now everytime somebody logs in, it prompts them to setup the Google Auth MFA again, even though they already did. To fix this I’ve tried to get some data about each user via accessing the admin endpoint:

{{base_url}}admin/realms/{{realm}}/users/{{user_id}}

This returns a variable called TOTP which perfectly tells me if it has been setup. The problem however is accessing this data. To gain access to this endpoint I need an access token which is gained via PKCE. Is there no easier way to get access to the Admin API? And if there isn’t, is there some simple out of the box method to get an access token via PCKE?

p.s. sorry if this is a stupid question.