Logo Help Center

Elvis 4 API - authcred

Elvis 4 API - authcred

Append to URL

?authcred=<base64Encode( username + ":" + password )> [&authpersist=true] [&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.


By default the authcred credentials are only used for that specific request. Any existing authentication for the browser session is ignored while executing the request. The authentication for the browser session will not be changed.

This behavior can be influenced by adding &authpersist=true to the URL, in which case the new authentication will be applied to the browser session.

Client type

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".


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 webpage:

http://elvis.example.com/preview/5eOP0sDHaFUBneDXTrJW_P /previews/maxWidth_600_maxHeight_600.jpg ////Reflection_preview.jpg?authcred=Z3Vlc3Q6Z3Vlc3Q=

A QR code image for this 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 HD 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 webpage. This video will also playback properly on iPads, iPhones and other mobile devices.

<video src="http://elvis.example.com/preview/3jaJq1DKKM_9hW65BnbocL
   ?authcred=Z3Vlc3Q6Z3Vlc3Q=" controls="true" autoplay="true"></video>

Link to the original of an asset:

http://elvis.example.com/file/5eOP0sDHaFUBneDXTrJW_P ////Reflection.jpg?authcred=Z3Vlc3Q6Z3Vlc3Q=

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:


Was this article helpful?
0 out of 0 found this helpful / Created: / Updated:
Have more questions? Submit a request


Please sign in to leave a comment.