Not able to retrieve chat history using getMessages GET API

In order to get the history for Chat we have followed the documentation as given by you. (https://developer.kore.ai/docs/bots/api-guide/conversation-history-api/) :

  1. Enabled the app’s Bot Builder API scope to Chat History .

  2. Called the API from Documentation (https://bots.kore.ai/api/public/bot/st-f405da93-162e-58f2-86aa-74a2e3c11337/getMessages) with following parameters:

userId : praful_dhone@persistent.com
skip (optional): 0 or 10
limit (optional): 0 or 10
dateFrom (optional): Today or 2020-11-20
channelType (optional): kore or not specified.

In Header, passed the proper JWT Token. We are getting the 200 OK Status code with empty history.

{
“total”: 0,
“moreAvailable”: false,
“icon”: “https://dlnwzkim0wron.cloudfront.net/f-7f08c5fd-d769-5115-a89e-7bb546f6e074.png”,
“messages”: []
}

  1. We have published the Bot and tried to test it. Still not getting any history. Following are the screen shots:

Are we missing something important here?

We also have question on JWT Token. Till now, we are able to generate the JWT token in Web SDK in order to call the Bot.

How can we generate it on Platform to call the chat history?

Option 1: Are we supposed to pass this from Web SDK to Bot platform and then use it in API call of Chat History?
Option 2: Generate it on the fly on platform and call the Chat History API?