Webex Teams bots will only be able to access messages that the bot itself sent, or messages in which it is '@' mentioned.
You can try using the temporary 'personal access token' you can retrieve from the Teams docs pages here (be sure to log in first:) https://developer.webex.com/docs/api/getting-started
However for production use, you will want to implement an OAuth integration, allowing the user to login via Teams OAuth so your app can get a 'real' user access token, which should be able to retrieve all messages in rooms where the user is a member: https://developer.webex.com/docs/integrations
If you need to archive messages for other/all users, note there is a 'compliance' role and application pattern that should be helpful: https://developer.webex.com/docs/api/guides/compliance