Retrieve details from the local storage browser

Hello Team,
There is a use case for which we need to retrieve details from the local storage of the browser and pass onto an api in our bot, can we do this from our code base, in our functional base can we write the function to retrieve from the local storage and pass it onto the api request params and validate the person on the bot .
Or if any workaround that can be used here.

Hi Team , no worries
Was able to try it in the chat widget code inside the payload we can pass the data and it can be retrieved using the data.profile.payload onto our platform.