Files
Download a file through its signed URL
The route a file's download_url points at. The URL names one file's exact bytes (the Pen, the content hash and the path) and carries an expiry and a signature over all of it, so anyone holding it fetches the file for an hour with no API key, session or Referer. Read the file through the API for a URL; the parameters are not meant to be built by hand. The bytes are served as an attachment with the file's content_type. A URL for a Pen that has since been moved to the trash answers 404.
get/v2/pens/{id}/download/{path}
Request
- Base URLhttps://api.codepen.io
- Authnone required
Query parameters
hashstring required
The file's content_hash.
expiresstring required
When the URL stops answering, as unix seconds.
sigstring required
The signature over the Pen, hash, path and expiry.
Response
The file's bytes, as an attachment.
Changes
No recorded changes to this operation across all 1 revision of this API.