英文:
How to resolve error code EXC-002 when accessing Autodesk Data Exchange API?
问题
我目前正在按照数据交换 API 教程中的 任务 1 - 访问交换容器。然而,在步骤 5 中,当我查询 ACC 文档中的交换容器(从 Revit 2023 文件生成)时,我收到以下错误信息:
状态代码:403
{"title":"无论授权状态如何都拒绝访问。","detail":"禁止读取源文件。","requestId":"
我正在通过双重身份验证流程进行身份验证,并已使用传统 Web 应用程序和 Server2Server 应用程序进行了测试。我尝试使用的两个 APS 应用程序都是在 ACC/BIM360 帐户上注册的自定义集成。然而,两者都返回相同的错误。
文件夹的权限设置为 "所有人",权限为 Create->(查看+下载+发布标记+上传)。然而,我不确定如何分别设置源 Revit 文件和交换文件的权限。此外,我不确定这些权限是否会影响应用程序权限。
我已尝试以下操作:
- 双重身份验证(尝试了使用 APS Server2Server 应用程序和传统 Web 应用程序)并成功返回身份验证令牌(范围为 data:read)。
- 使用上述令牌,我可以成功查询中心、项目和文件夹。
- 在以下查询中使用了我创建的 FDX 文件的 ID:'https://developer.api.autodesk.com/exchange/v1/exchanges?filters=attribute.exchangeFileUrn=={itemID}' - 出现了上述错误。
- 在此查询中尝试使用源 Revit 文件的 itemId:'https://developer.api.autodesk.com/exchange/v1/exchanges?filters=attribute.sourceFileUrn=={itemID}' - 出现了相同的错误。
如果需要,我愿意提供任何额外的信息。
英文:
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":<requestedId>,"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:
- 2-legged authentication (tried with APS Server2Server app & Traditional Web App) and an authentication token is successfully returned (scope=data:read)
- With the above token I can successfully query hub, project and folders
- 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
- 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.
答案1
得分: 0
这个问题已经在我们的论坛社区中得到了回答,链接在这里:https://forums.autodesk.com/t5/data-exchange-community/error-code-quot-exc-002-quot-when-accessing-an-exchange-file/m-p/12000001#M41
英文:
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
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论