title: Data management API 403 Error: This user could not be authenticated
body: <p>I am writing a python script that automates the process of getting drawing files from a project. Currently I am able to access but hub, list of projects and folders through the script. However, whenever I try to search the folder for all drawing files I get a 403 Error saying the users could not be authenticated.</p>
  <p>I am using 2 legged authentication to get the access token. I added data:search to the scope as required by the api but still get the same error. I have search everywhere online and nothing seems to work. Please is there anyone that can help.</p>
  <p>I have attached the access token  function, the search function and an image of the result.</p>
  <pre><code>def getAccessToken():
  url = &quot;https://developer.api.autodesk.com/authentication/v1/authenticate&quot;
  payload = 'client_id={client_id}&amp;client_secret={client_secret}&amp;grant_type=client_credentials&amp;scope=code%3Aall%20data%3Awrite%20data%3Aread%20data%3Asearch%20bucket%3Acreate%20bucket%3Adelete%20bucket%3Aread%20account%3Aread'
  headers = {
      'Content-Type': 'application/x-www-form-urlencoded',
  }
  response = requests.request(&quot;POST&quot;, url, headers=headers, data=payload)
  json_data = json.loads(response.text)
  return json_data[&quot;access_token&quot;]
  token = getAccessToken()
  
  def getDrawingFiles(folderId):
  
  
  
  
  def getDrawingFiles(folderId):
      url = f&quot;https://developer.api.autodesk.com/data/v1/projects/{project_id}/folders/{folderId}/search&quot;
      payload = {}
      headers = {
          'Content-Type': 'application/x-www-form-urlencoded',
          'Authorization': f'Bearer {token}',
          'x-user-id': userId,
          'x-ads-region':'emea'
      }
      response = requests.request(&quot;GET&quot;, url, headers=headers, data=payload)
      json_data = json.loads(response.text)
      print(json_data)
  
  
  getDrawingFiles('urn:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx)
  </code></pre>
  <p><a href="https://i.stack.imgur.com/8qV7e.png" rel="nofollow noreferrer">Error Message</a></p>
  <p>Please can anyone offer some advice?</p>