How to convert public delivery types to authenticated delivery type for existing media ?


1 comment

  • Avatar
    Tamara Yulevich


    Thanks for reaching out.

    There are two options to make the asset authenticated:
    1. You can use the Rename method of the Upload API to change the delivery type of an asset. You can put the same value to the parameters to_public_id and from_public_id, then add to_type: public.
    Please check the documentation for more information:

    Please note that the URL will change and you'll need to use a different URL. for example:<public_id>.jpg

    2. If you have a private CDN you use token authentication - First you'll need to update those resources:
        access_control: [{ access_type: 'token' }]
      function(error, result) {console.log(result, error)}
    Then in order to access them, you will need to use your key:

    cloudinary.image("sample",{type:"authenticated",auth_token:{key:"<your key>",duration:300},sign_url:true})

    Best regards,

    Comment actions Permalink

Please sign in to leave a comment.