Using api with python

Hello. The metabase is deployed on my local network. I want to use api to create and delete users. Authorization in my metabase works via google. I try to log in with google and get google token. Then I try to get the metabase api token but cannot figure out where I need to pass the google token. I make a post request to metabaseurl.com/api/session and pass json there with username and password. In response, I receive an html page asking me to log in via google. I tried to pass google token in header and along with username and password but the result doesn't change. I really hope for your help, because I myself could not find anything.
P.S. I am using python and maybe you can send me some code examples.

Hi @viktor.belousov
What does "I try to log in with google and get google token" mean?
Are you using some type of reverse-proxy, then you'll need to figure out how to get past that before you can even communicate with Metabase.
So the problem is not Metabase, but the reverse-proxy you are using.

Is there a link to reverse-proxy information? I don't understand what it is

@viktor.belousov Post a link to your Metabase installation.