Marketing API
Assets
Download Asset
this api endpoint (post) (post) generates a download link for an asset each generated link has a lifespan of 5 seconds permissions assets edit note folders cannot be downloaded path parameters id the id of the asset require "uri" require "json" require "net/http" url = uri("https //api tamio com/v2/assets/download/25213be6 a152 4120 88a8 83e17a3a3ebc") https = net http new(url host, url port) https use ssl = true request = net http get new(url) request\["accept"] = "application/json" request\["authorization"] = "bearer your token here" response = https request(request) puts response read bodycurl location request get 'https //api tamio com/v2/assets/download/25213be6 a152 4120 88a8 83e17a3a3ebc' \\ \ header 'accept application/json' \\ \ header 'authorization bearer your token here'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("authorization", "bearer your token here"); var requestoptions = { method 'get', headers myheaders }; fetch("https //api tamio com/v2/assets/download/25213be6 a152 4120 88a8 83e17a3a3ebc", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));{ "status" 200, "url" "https //files tamio com/cool image jpg?x amz algorithm=aws4 hmac sha256\&x amz content sha256=60303ae22b998861bce3b28f33eec1be758a213c86c93c076dbe9f558c11c752\&x amz credential=6nl4fgi9an352rjemo1i%2f20221123%2fnl%2fs3%2faws4 request\&x amz date=20221123t195224z\&x amz expires=86400\&x amz signedheaders=host\&x amz signature=b756b9df7ba2db4b3f514b427bf469e74367af5b8c4b0b2cff586451fdca715b" }