Search code examples
autodesk-forgeautodesk-data-exchange

How to resolve error code EXC-002 when accessing Autodesk Data Exchange API?


I am currently following the Task 1 - Access Exchange Container of the Data Exchange API Tutorials. However, when I query the exchange container within ACC Docs (generated from a Revit 2023 file) in Step 5 I get the following error:

Status code: 403 {"title":"Access denied regardless of authorization status.","detail":"Read on the source file is forbidden.","requestId":,"code":"EXC-002"}

I am authenticating this via a two-legged authentication flow and have tested it with both a Traditional Web and a Server2Server App. Both APS apps I tried using are registered custom integrations on the ACC/BIM360 account. However, both return the same error.

The permissions on the folder are set for "Everyone" as Create->(View+Download+Publish-markups+Upload). However, I am unsure how to set the permissions for the Source Revit file and the Exchange file individually. Furthermore, I am unsure if these permissions have an affect on app permissions.

I've tried the following:

  1. 2-legged authentication (tried with APS Server2Server app & Traditional Web App) and an authentication token is successfully returned (scope=data:read)
  2. With the above token I can successfully query hub, project and folders
  3. Used the id of the FDX file I created in the following query: 'https://developer.api.autodesk.com/exchange/v1/exchanges?filters=attribute.exchangeFileUrn=={itemID}' - the aforementioned error was raised
  4. Tried using the itemId of the source Revit file in this query: 'https://developer.api.autodesk.com/exchange/v1/exchanges?filters=attribute.sourceFileUrn=={itemID}' - same error raised

Happy to provide any additional information, if needed.


Solution

  • this question has been answered at our forum community here: https://forums.autodesk.com/t5/data-exchange-community/error-code-quot-exc-002-quot-when-accessing-an-exchange-file/m-p/12000001#M41