How can I access an IAP protected resource using Python? More specifically I'd like to generate the Bearer token needed in the Authorization header to make calls to the IAP protected resource.
I have created a service account, given it "IAP-Secured Webapp User" permissions and have downloaded its JSON credentials to disk.
Since you have created a service account for authentication, you can use an OIDC token for authentication into IAP-secured resources.
The steps to obtain and use the token for authentication are shown here, but here is a little summary:
Authorization: Bearer header, and that way you will have an authenticated request to the IAP-protected resource.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With