function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Vidya Deo 9Vidya Deo 9 

lightningsnapin:minimizedUI getLiveAgentSettings() to grab liveAgent settings in Lightning Component

I am developing lightning Component for Live Agent to use in Community pages.
I followed help document mentioned here 
https://developer.salesforce.com/docs/atlas.en-us.snapins_web_dev.meta/snapins_web_dev/snapins_web_lightning_components_minimized_samples.htm

 Use the Aura method getLiveAgentSettings() to grab the settings that you want to use: liveAgentButtonId, liveAgentDeploymentId, chatbotAvatarImgURL, avatarImgURL.


I am unable to get the settings and not sure which button Id to define in this code snippet. I tried with live agent chat button and 
  // The ID of the Live Agent button for which you want to customize your pre-chat fields
    var ANONYMOUS_BUTTON_ID = "(your button id here)";

       // Fetch the ID of the Live Agent button currently in use
       var buttonId = cmp.find("settingsAPI").getLiveAgentSettings().liveAgentButtonId;

Has anyone used this in the lightning components and in Community pages?