The need for API key and cloudname in Media Library Widget

Options
itsrakesh
itsrakesh Member Posts: 2
edited January 23 in Developer APIs

Hi,

I'm integrating Cloudinary Media Library Widget in my application. But I'm confused on why we have to provide API key and cloudname as user will authenticate himself to use the widget? (I don't feel secure using secrets in client-side code)

Also, do I have to provide my API key and cloudname or ask user to create and provide to my application?

(Unrelated but ImageKit also provides similar widget and we don't have to provide API key.)

Thanks.

Tagged:

Answers

  • Cloudinary Team
    Cloudinary Team Administrator, Cloudinary Staff Posts: 135 admin
    Options

    Hi Rakesh,

    The API key is a unique identifier for your Cloudinary account. It is used to authenticate your requests to the Cloudinary API. By providing your API key, the Cloudinary Widget ensures that the user accessing the widget can perform actions on your Cloudinary account.

    The cloud name helps the widget identify the specific Cloudinary account and location where users want to upload or manage media.

    You will have to provide your API key and cloud name as you will control the account and can manage all assets from there centrally.

    Hope this helps.

    Regards,
    Akshay

    Helpful Links For You
    💬 Share questions, connect with other users in our Cloudinary Community forums and Discord server!
    🧑‍🎓 Join our Cloudinary Academy for free courses, workshops and other educational resources.
    📄 Read our documentation for in-depth details on Cloudinary product features and capabilities
    📰 Check out the Cloudinary blog for the latest company news and insights

  • itsrakesh
    itsrakesh Member Posts: 2
    Options

    I get it now.

    Is there a way a cloudinary user can log in to the widget and access their library without requiring to share API key and cloud name?

  • Tom
    Tom Member, Cloudinary Staff Posts: 78
    Options

    Hi @itsrakesh ,

    I'm afraid API key and cloud name are mandatory fields as per https://cloudinary.com/documentation/media_library_widget#2_set_the_configuration_options.

    Please let me know if you have any other questions.

    Thanks,

    Thomas