Get Signed Url
This endpoint allows you to retrieve the signed URL for a private asset.
https://api.storyblok.com/v2/cdn/assets/me
Query Parameters
-
token
required stringAn Asset Token. Read more about tokens in the concept.
-
filename
stringFull path of the asset, including the file name
Response Properties
-
asset
objectasset object received in the response of a get signed URL request.
-
alt
stringAlt text for the asset (default language)
-
asset_folder_id
numberId of the folder containing this asset
-
content_length
numberThe content length in bytes
-
content_type
stringThe content type ( eg, image/png )
-
copyright
stringCopyright text for the asset (default language)
-
created_at
stringCreation date (Format:
yyyy-MM-dd'T'HH:mm:ssZ
) -
expire_at
stringDate when the asset should expire (Format: yyyy-MM-dd'T'HH:mm:ssZ)
-
filename
stringFull path of the asset, including the file name
-
focus
stringThe focus point of the image (Only for image assets)
-
is_private
booleanDefines if the asset should be inaccessable to the public
-
signed_url
stringThe signed URL for the asset
-
title
stringTitle of the asset
-
curl "https://api.storyblok.com/v2/cdn/assets/me?token=<your-token>&filename=https://a.storyblok.com/f/320484/3024x1964/4307937717/screen-shot-2022-11-17-at-17-19-20-pm.png" \
-X GET \
-H "Accept: application/json" \
-H "Content-Type: application/json"
// Using the Universal JavaScript Client:
// https://github.com/storyblok/storyblok-js-client
Storyblok.get('cdn/assets/me', {
"filename": "https://a.storyblok.com/f/320484/3024x1964/4307937717/screen-shot-2022-11-17-at-17-19-20-pm.png"
})
.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/320484/3024x1964/4307937717/screen-shot-2022-11-17-at-17-19-20-pm.png"
])->getBody();
require 'storyblok'
client = Storyblok::Client.new(oauth_token: 'YOUR_OAUTH_TOKEN')
client.space({:params => {
"filename" => "https => //a.storyblok.com/f/320484/3024x1964/4307937717/screen-shot-2022-11-17-at-17-19-20-pm.png"
}})
HttpResponse<String> response = Unirest.get("https://api.storyblok.com/v2/cdn/assets/me?token=<your-token>&filename=https://a.storyblok.com/f/320484/3024x1964/4307937717/screen-shot-2022-11-17-at-17-19-20-pm.png")
.asString();
var client = new RestClient("https://api.storyblok.com/v2/cdn/assets/me?token=<your-token>&filename=https://a.storyblok.com/f/320484/3024x1964/4307937717/screen-shot-2022-11-17-at-17-19-20-pm.png");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "https://api.storyblok.com/v2/cdn/assets/me?token=<your-token>&filename=https://a.storyblok.com/f/320484/3024x1964/4307937717/screen-shot-2022-11-17-at-17-19-20-pm.png")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0)
request.method = "GET"
let session = URLSession.shared
let 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()
import requests
url = "https://api.storyblok.com/v2/cdn/assets/me"
querystring = {"token":"<your-token>","filename":"https://a.storyblok.com/f/320484/3024x1964/4307937717/screen-shot-2022-11-17-at-17-19-20-pm.png"}
payload = ""
headers = {}
response = requests.request("GET", url, data=payload, headers=headers, params=querystring)
print(response.text)