Storyblok
Search Storyblok's Documentation
  1. Get Signed Url

Content Delivery API

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 string

    An Asset Token. Read more about tokens in the concept.

  • filename

    string

    Full path of the asset, including the file name

Response Properties

  • asset

    object

    asset object received in the response of a get signed URL request.

    • 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 ( eg, 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 inaccessable to the public

    • signed_url

      string

      The signed URL for the asset

    • title

      string

      Title of the asset

Request
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"
Request
// 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)
  })
Request
$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();
Request
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"
}})
Request
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();
Request
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);
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()
Request
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)