使用 Forge V2 端点将用户导入 BIM 360 项目

Import users to BIM 360 project using Forge V2 endpoint

我正在尝试使用 Autodesk Forge API 在 BIM 360 Field 中自动设置项目。该代码在内部系统上设计为 运行,目前使用 two legged authentication method. I've managed to get a project setup, I'm now trying to add a project admin using the recommended V2 import endpoint:

POST projects/:project_id/users/import

因为我使用的是双腿身份验证,所以我在 header 中指定了我的 x-user-id。当我 运行 时,我收到以下错误:

{fault.name} - The client_id specified does not have access to the api product

无论我使用哪个 V2 端点,都会发生这种情况;即使在应用程序的 Forge 开发中心中启用了所有服务。我看过 this answer 并且 Mikako 的解决方案有效,但这是通过使用 V1 端点,我希望能够使用此端点和其他 V2 端点。我的 V2 实现可能出了什么问题?

我认为是因为你的项目是Field classic。 Field classic 是一个前 Forge 时代的 web 服务。它不是 Forge 的一部分。

您可以尝试字段 API: https://bim360field.autodesk.com/apidoc/index.html#api/v1/project_users_method_3

Field 的新版本正在为拥有 Field 的客户提供预览。

关于什么是Forge,什么不是,请参考这个post: https://fieldofviewblog.wordpress.com/2017/01/17/bim-360-and-forge-overview/

或者关于 Field classic 的一般情况: https://fieldofviewblog.wordpress.com/forge/