Skip to content

Comments

samples: updating signed url samples#1531

Merged
shubham-up-47 merged 4 commits intogoogleapis:mainfrom
shubham-up-47:updating_signed_url_samples
Aug 25, 2025
Merged

samples: updating signed url samples#1531
shubham-up-47 merged 4 commits intogoogleapis:mainfrom
shubham-up-47:updating_signed_url_samples

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
@shubham-up-47 shubham-up-47 added the owlbot:run Add this label to trigger the Owlbot post processor. label Aug 25, 2025
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Aug 25, 2025
@shubham-up-47 shubham-up-47 merged commit 87f27e4 into googleapis:main Aug 25, 2025
15 checks passed
@shubham-up-47 shubham-up-47 deleted the updating_signed_url_samples branch August 25, 2025 05:16
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