Skip to content

samples: updating signed url samples #1531

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

shubham-up-47
Copy link
Contributor

@shubham-up-47 shubham-up-47 commented Aug 22, 2025

The documentation states ADC cannot be used in with the signed_URL method in Python SDK, but it can be used as shown in the code snippet below,

from google.auth import default
from google.auth.transport.requests import Request

credentials, _ = default()
access_token = credentials.token
service_account_email = credentials.service_account_email

url = blob.generate_signed_url(
    ...
    service_account_email=service_account_email,
    access_token=access_token
)

@shubham-up-47 shubham-up-47 requested review from a team as code owners August 22, 2025 06:58
@shubham-up-47 shubham-up-47 requested a review from ohmayr August 22, 2025 06:58
@product-auto-label product-auto-label bot added the size: s Pull request size is small. label Aug 22, 2025
@product-auto-label product-auto-label bot added api: storage Issues related to the googleapis/python-storage API. samples Issues that are directly related to samples. labels Aug 22, 2025
@shubham-up-47 shubham-up-47 changed the title chore: updating signed url samples samples: updating signed url samples Aug 22, 2025
@shubham-up-47 shubham-up-47 added the owlbot:run Add this label to trigger the Owlbot post processor. label Aug 22, 2025
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Aug 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the googleapis/python-storage API. samples Issues that are directly related to samples. size: s Pull request size is small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants