Lifespan of view_url?

I am using the API to get the view_url to use for an image in an email which then also hyperlinks to the permanent_url. My question is how long is a given view_url valid? Is this a stable value or unpredictable?

If 24 hours or more, that should work for my purposes, but it will be gone before the recipients have a chance to open their email, I will just include a straight hyperlink to the permanent_url.

Hi @Angel_Lemke , my assumption is that you’re referring to the properties of the Attachments object.

If so, the URL in the permanent_url field is effectively permanent for as long as the attachment itself exists. However, it is still protected by an authorization layer, so embedding it as an image in an email will only work when the email is viewed by a user who has access to that attachment.

The view_url property can take different forms depending on the attachment type (for example, it may be a link to Google Drive, Dropbox, etc.). When the attachment is uploaded as a file, the URL typically includes X-Amz-Expires and X-Amz-Date parameters, which indicate the lifespan.

Overall, using attachments as a source for serving assets isn’t a great idea.

Agreed, only using attachments in this case due to a lack of better options. Thanks for the X-Amz-Expires parameter info, very helpful!

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