我创建了一个查看器应用程序,它使用两条腿身份验证并显示已上传到我自己的存储桶的项目。现在,我希望能够查看已上传到 Autodesk A360 的项目,而不是查看自己存储桶中的项目。
为此,我已完成以下步骤:
- 实现了三足认证(项目中的A360账号与正在认证的账号相同)。
- 访问中心、项目和文件,如中所述https://developer.autodesk.com/en/docs/data/v2/tutorials/download-file/.
- 而不是下载项目并将其上传到我自己的存储桶,如中所述https://developer.autodesk.com/en/docs/data/v2/tutorials/app-management-bucket/, 得到了标识符
(
urn:adsk.wipprod:fs.file:vf.6bVr4EVDSaOpykczeQYR2Q?version=1
)从文件请求的结果中并将其转换为 URL 友好的 Base64(dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6bXktYnVja2V0L215LWF3ZXNvbWUtZm9yZ2UtZmlsZS5ydnQ=
).
因此,转换后的 URN 应与 A360 用于其自己的查看器的 URN 相同。
When viewing the project with the URN on my own application, the network console is displaying the following error message:
![Error message](https://i.stack.imgur.com/Vu9bv.png)
When looking at the specific request, the following response is returned:
![Response](https://i.stack.imgur.com/OwLLb.png)
I also made sure that the converted URN is equal to the URN that the A360 is using. For that I compared it with the response of A360:
![URN](https://i.stack.imgur.com/8k4ry.png)
因此,当查看器在 A360 中工作时,我想知道 A360 中的项目是否也可以在我自己的应用程序中查看(A360 查看器的存储桶已经存在,因此没有理由重复相同的存储桶创建过程和上传文件)。
如果可以使用与URN相同的项目,那么我也想知道为什么请求未授权。
如果您需要任何其他代码,请务必询问。
您可以在 GitHub 上查看以下三个示例,所有三个示例都访问 A360 上的 CAD 模型并在查看器中显示它们:
数据管理 APIP 示例:https://github.com/Developer-Autodesk/data.management.api-nodejs-sample
模型导数 API 示例:https://github.com/Developer-Autodesk/model.derivative.api-nodejs-sample
实时往返 BIM 编辑器:https://github.com/jeremytammik/model.derivative.api-nodejs-sample-roomedit3d
roomedit3dv2 往返 Forge BIM edi 提供了其工作原理的证明,8 分钟的演示录制:
https://www.youtube.com/watch?v=bDI5YX7PDP8
祝你好运!
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)