Append to URL
?authcred=<base64Encode( username + ":" + password )> [&authclient=api_...]
What does it do?
It can be added to a URL to authenticate the request with the provided credentials.
Warning: When you add an authcred to a URL, it is trivial for others to decode the credentials and retrieve the password. For this reason you should only use it for material that is 'public'. In most cases this means you should create a public guest account with very limited permissions.
When to use?
Adding an authcred to a URL can be useful when you want to publish or distribute URLs to Elvis content. For example to:
- Publish assets from Elvis directly on the web.
- Insert URLs for asset previews in your web CMS.
- Publish links or QR codes that link directly to content.
An optional authclient can be specified to track which interface was used to perform operations logged in the asset usage history. The client type must be prefixed with "api_", for example: "api_MyPublicWebsite".
Note: All examples use an authcred for the guest:guest user that can only see public material.
Link to an image preview
The maximum width and height are adjusted for use on a Web page:
http://elvis.example.com/preview/5eOP0sDHaFUBneDXTrJW_P /previews/maxWidth_600_maxHeight_600.jpg ////Reflection_preview.jpg?authcred=Z3Vlc3Q6Z3Vlc3Q=
QR code image for a preview
http://qrcode.kaywa.com/img.php?s=6&d= http%3A%2F%2Felvis.example.com%2Fpreview %2F5eOP0sDHaFUBneDXTrJW_P %2Fpreviews%2FmaxWidth_600_maxHeight_600.jpg %3Fauthcred%3DZ3Vlc3Q6Z3Vlc3Q%3D
Link to a video preview
The maximum width and height are adjusted to generate a high-definition preview for the video:
http://elvis.example.com/preview/3jaJq1DKKM_9hW65BnbocL /previews/maxWidth_1280_maxHeight_720.mp4 ////Toy%20Story%203%20-%20Trailer_preview.mp4 ?authcred=Z3Vlc3Q6Z3Vlc3Q=
Video embed tag for use on a Web page
Note: This will also play the video correctly on mobile devices.
<video src="http://elvis.example.com/preview/3jaJq1DKKM_9hW65BnbocL /previews/maxWidth_480_maxHeight_360.mp4 ?authcred=Z3Vlc3Q6Z3Vlc3Q=" controls="true" autoplay="true"></video>
Link to the original of an asset
Download link to the asset with a custom client type
Download link to the asset with a custom client type that will be displayed in the download history of the asset
http://elvis.example.com/file/5eOP0sDHaFUBneDXTrJW_P ////Reflection.jpg?forceDownload=true &authcred=Z3Vlc3Q6Z3Vlc3Q= &authclient=api_DownloadPortal
Link to an RSS feed with the latest public assets