Get Signed URL
Retrieve the signed URL for a private asset to access it. Learn more about private assets in the Assets concept.
https://api.storyblok.com/v2/cdn/assets/meQuery parameters
Section titled “Query parameters”- token required string
An asset token configured in the space
- filename required string
Complete URL of the asset
Response properties
Section titled “Response properties”- asset object
asset object received in the response of a get signed URL request.
Show asset object child properties
- alt string
Alt text for the asset (default language)
- asset_folder_id number
ID of the folder containing this asset
- content_length number
The content length in bytes
- content_type string
The content type (e.g., image/png)
- copyright string
Copyright text for the asset (default language)
- created_at string
Creation date (Format: yyyy-MM-dd’T’HH:mm:ssZ)
- expire_at string
Date when the asset should expire (Format: yyyy-MM-dd’T’HH:mm:ssZ)
- filename string
Full path of the asset, including the file name
- focus string
The focus point of the image (only for image assets)
- is_private boolean
Defines if the asset should be inaccessible to the public
- signed_url string
The signed URL for the asset
- title string
Title of the asset
-
Examples
Section titled “Examples”curl "https://api.storyblok.com/v2/cdn/assets/me?token=pL43PrKPdU9kW6R1DKoFrgtt&filename=https%3A%2F%2Fa.storyblok.com%2Ff%2F184738%2F3500x2000%2Fc817583540%2Fmars.jpg"// Using the Universal JavaScript Client:// https://github.com/storyblok/storyblok-js-clientStoryblok.get('cdn/assets/me', { "filename": "https://a.storyblok.com/f/184738/3500x2000/c817583540/mars.jpg"}) .then(response => { console.log(response) }).catch(error => { console.log(error) })$client = new \Storyblok\Client('YOUR_STORYBLOK_SPACE_ACCESS_TOKEN');
$client->get('assets/me', [ "filename" => "https =>//a.storyblok.com/f/184738/3500x2000/c817583540/mars.jpg"])->getBody();HttpResponse<String> response = Unirest.get("https://api.storyblok.com/v2/cdn/assets/me?token=pL43PrKPdU9kW6R1DKoFrgtt&filename=https%3A%2F%2Fa.storyblok.com%2Ff%2F184738%2F3500x2000%2Fc817583540%2Fmars.jpg") .asString();var client = new RestClient("https://api.storyblok.com/v2/cdn/assets/me?token=pL43PrKPdU9kW6R1DKoFrgtt&filename=https%3A%2F%2Fa.storyblok.com%2Ff%2F184738%2F3500x2000%2Fc817583540%2Fmars.jpg");var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);import requests
url = "https://api.storyblok.com/v2/cdn/assets/me"
querystring = {"token":"pL43PrKPdU9kW6R1DKoFrgtt","filename":"https://a.storyblok.com/f/184738/3500x2000/c817583540/mars.jpg"}
payload = ""headers = {}
response = requests.request("GET", url, data=payload, headers=headers, params=querystring)
print(response.text)require 'storyblok'client = Storyblok::Client.new(token: 'YOUR_TOKEN')
client.get('assets/me', {:params => { "filename" => "https =>//a.storyblok.com/f/184738/3500x2000/c817583540/mars.jpg"}})import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "https://api.storyblok.com/v2/cdn/assets/me?token=pL43PrKPdU9kW6R1DKoFrgtt&filename=https%3A%2F%2Fa.storyblok.com%2Ff%2F184738%2F3500x2000%2Fc817583540%2Fmars.jpg")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0)request.method = "GET"
let session = URLSession.sharedlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) }})
dataTask.resume()Get in touch with the Storyblok community