Skip to main content
Participant
April 24, 2024
Answered

Issue with Downloading Video Assets via Adobe Stock API

  • April 24, 2024
  • 1 reply
  • 738 views

Hello,

I hope this message finds you well. I am encountering an issue while using the Adobe Stock API to download assets.

Specifically, I have successfully used the API to download assets of various types (images, photos, vectors, etc.) without any problems. However, when attempting to download a video asset (HD or 4k) using the following endpoint per exemple : https://stock.adobe.com/Rest/Libraries/Download/125851226/1?token=myToken I consistently encounter the following error message:

{
"error": "Cannot find a download for this file and license on this entitlement",
"code": "201",
"case": "c5519a4f88885c1b98bb3c88837bea6f"
}

 

This issue is specific to video assets, as downloads for other asset types are working correctly.

Could someone please assist ?
Thanks

This topic has been closed for replies.
Correct answer Christopher at Adobe

Hi.

 

The issue is the /1 in your URL. That only applies to Standard image downloads. Where did you get this URL? Did you follow the licensing workflow where you call the Content/License API or License History API to get the URL? Those are the only methods to get the correct URL. I believe for HD videos you will use a value of /4, but you should do this the proper way to get the value.

 

https://developer.adobe.com/stock/docs/api/12-licensing-reference/

https://developer.adobe.com/stock/docs/api/13-license-history/ 

 

FYI, we plan to deprecate the token= method in favor of sending authenticated headers, since that method exposes your access token to server logs. We recommend you use your token in the Authentication header instead of in the query parameters, like this:

 

curl --request GET \
  --url https://stock.adobe.com/Rest/Libraries/Download/125851226/4 \
  --header 'Authorization: Bearer TOKEN' \
  --header 'X-Product: MyApp_1.0' \
  --header 'x-api-key: TOKEN'

 

 

 

Thanks,

Christopher

1 reply

Christopher at Adobe
Community Manager
Christopher at AdobeCommunity ManagerCorrect answer
Community Manager
April 24, 2024

Hi.

 

The issue is the /1 in your URL. That only applies to Standard image downloads. Where did you get this URL? Did you follow the licensing workflow where you call the Content/License API or License History API to get the URL? Those are the only methods to get the correct URL. I believe for HD videos you will use a value of /4, but you should do this the proper way to get the value.

 

https://developer.adobe.com/stock/docs/api/12-licensing-reference/

https://developer.adobe.com/stock/docs/api/13-license-history/ 

 

FYI, we plan to deprecate the token= method in favor of sending authenticated headers, since that method exposes your access token to server logs. We recommend you use your token in the Authentication header instead of in the query parameters, like this:

 

curl --request GET \
  --url https://stock.adobe.com/Rest/Libraries/Download/125851226/4 \
  --header 'Authorization: Bearer TOKEN' \
  --header 'X-Product: MyApp_1.0' \
  --header 'x-api-key: TOKEN'

 

 

 

Thanks,

Christopher

Participant
May 30, 2024

Hello @Christopher at Adobe 

Indeed, I was previously hardcoding the URL for the download request, but now I retrieve it from the response of the License History endpoint, and it works perfectly!

I also took your suggestion into account regarding passing the token in the headers. I agree that it wasn't the best practice to send it in plain text.

Once again, thank you for your response.