title: MongoDB rest API for DB access events not working : 401 Client Error: Unauthorized
body: <p>I have been trying to fetch DB access history using "dbAccessHistory" api but getting the following error :</p>
  
  <blockquote>
    <p>03-23-2020 06:34:34.201 +0000 ERROR ExecProcessor - message from
    "python xxxxx/rest_ta/bin/rest.py" HTTP Request error: 401 Client
    Error: Unauthorized</p>
  </blockquote>
  
  <p>API documentation : <a href="https://docs.atlas.mongodb.com/reference/api/access-tracking-get-database-history-clustername/" rel="nofollow noreferrer">https://docs.atlas.mongodb.com/reference/api/access-tracking-get-database-history-clustername/</a></p>
  
  <p>Please let me know why is the permission error happening.</p>