Search code examples
google-cloud-platformgoogle-cloud-storagecloud

Does a GCP signed url behave the same way as a regular url?


In my code,I'm using regular image URLS to fetch images. If I had a signed URL of an image in a storage bucket, would I be able to just replace that URL with it?


Solution

  • In a nutshell, yes.

    But signed urls give limited time access while unsigned urls do not have a time limit. So the question is really - does your use case require use of a signed url?

    In simplistic terms, a signed url allows you to limit access to a resource (like who can view an image) without making the person first sign in. You generate a signed url (think of it like a random url that someone can't easily guess) and then send it to someone. The person can then click on the URL to access the underlying resource. If someone doesn't have that url, they won't be able to access the resource. In addition, the url will essentially expire after a time.

    The documentation explains more