# Generate presigned url

**URL:** <https://community.auth0.com/t/generate-presigned-url/60954>\
**Category:** Get Help\
**Tags:** jwt\
**Created:** [April 12, 2021, 9:58am UTC](https://community.auth0.com/t/generate-presigned-url/60954 "2021-04-12T09:58:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![praskatti](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/praskatti/32/13390_2.png) [@praskatti](https://community.auth0.com/u/praskatti)\
**Post date:** [April 12, 2021, 9:58am UTC](https://community.auth0.com/t/generate-presigned-url/60954/1 "2021-04-12T09:58:10Z")

</div>

Hi Auth0 team,

is it possible to generate a presigned url using auth0? the requirement is to send a url to a protected content but user need not have to login to access the URL. also, is there a way to shorten the jwt token for the same purpose?

thank you.  
Prasad

---

<div class="post-metadata">

**Author:** ![stephanie.chamblee](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/stephanie.chamblee/32/26087_2.png) [@stephanie.chamblee](https://community.auth0.com/u/stephanie.chamblee)\
**Post date:** [April 12, 2021, 2:37pm UTC](https://community.auth0.com/t/generate-presigned-url/60954/3 "2021-04-12T14:37:48Z")

</div>

Hi @praskatti,

I don’t believe there is a built-in way to generate pre-signed URLs for unauthenticated users using Auth0. Since authentication isn’t required to access the content, then it would not be protected by Auth0. If you instead want to create short-lived sessions for this content that end when the user closes the browser, then you could look into [Non-Persistent Sessions](https://auth0.com/docs/sessions/non-persistent-sessions)

Without authentication, one way to accomplish something like this that comes to mind would be to use a [JWT library](https://jwt.io/#libraries-io) to generate a JWT and store the JWT’s `jti` (JSON Web Token Identifier) claim in your database as a key. In your database, you could store data related to the JWT such as the resource ID for the content, etc. The benefit of using a JWT would be that you could verify that the token has not been tampered with and that it originated in your app, but you could also use a random opaque string instead of a token to accomplish the same thing. However, since the user isn’t logging in, there will be no Access Token/ID Token issued to this user, and so the content would be available to anyone who has the URL.

There is a discussion about a similar concept in this topic: [Get tokens for users who don't exist](https://community.auth0.com/t/get-tokens-for-users-who-dont-exist/38895)

---

<div class="post-metadata">

**Author:** ![praskatti](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/praskatti/32/13390_2.png) [@praskatti](https://community.auth0.com/u/praskatti)\
**Post date:** [April 12, 2021, 6:41pm UTC](https://community.auth0.com/t/generate-presigned-url/60954/4 "2021-04-12T18:41:11Z")

</div>

Thanks Stephanie. I concur with your thoughts. Opaque tokens with a short TTL backed by a database should work well here.

thanks also for the reference to the link.

Cheers  
Prasad

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [April 27, 2021, 6:41pm UTC](https://community.auth0.com/t/generate-presigned-url/60954/5 "2021-04-27T18:41:26Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
