Hi Vaibhav,
Thank you for posting your question.
I have been able to follow the steps to reproduce the exact scenario as you have described:
Step 1 : Create a new chatroom with the 'Let new memebers browse room history' chatroom permission enabled
Step 2: Add messages to the chatroom
Step 3: Add the chatbot into the chatroom
Step 4: Execute the POST Message Search REST API endpoint to obtain the messages (https://developers.symphony.com/restapi/reference/message-search-post)
From testing the scernario whilst using the POST Message Search REST API - I can confirm that the chatbot will not be able to obtain messages sent in the chatroom before the chatbot has been added. If there are any messages sent into the chatroom after the chatbot has been added then the POST Message Search REST API will be able to obtain & return the messages sent into the chatroom.
I believe for the exact scenario / use case you have described, there is a more suited Symphony REST API endpoint that you can use that will obtain messages before or after the chatbot has been added into the chatroom.
If you use the GET Get Messages REST API endpoint (https://developers.symphony.com/restapi/reference/messages-v4) - whilst specifing the 'ConversationID/StreamID' of the chosen chatroom & using the 'since' query parameter including the EPOCH timestamp. The EPOCH timestamp can be before the message is sent into the chatroom or a time period on when you would like to focus on. After using these criteria for the GET Get Message REST API, you will be able to obtain all of the messages sent into the room before or after the chatbot has been added to the chatroom.
I have been able to double check this scenario and I can confirm that the GET Get Message REST API will work for your use case.
Please feel free to let me know if you have any questions or feedback.
Hi Vaibhav,
Apolgises for the delay - can you confirm if you are still having the same SocketTimeoutException issue?
If the issue is still ongoing - I would recommend reaching out to either myself or the Symphony Support team (support@symphony.com) - so we can investigate in more detail to find out precisely.
It is likely that trying to pull messages from a really old chat room would result in the error you quoted - the criteria used to query the chat room may take too long for the result to return.
Please let me know should you need any further help or assistance.
Thanks Kaosar,
Get Messages REST API is worked.