添加adsk3LeggedToken时Revit设计自动化出现下载失败错误求助
问题解决:Design Automation提交工作项时下载失败与认证问题
问题描述
- 向Design Automation提交工作项时,添加
adsk3LeggedToken参数会触发下载失败错误;不添加该参数时,文件可成功下载并启动脚本,但运行脚本时会出现认证问题 - 使用
SaveAsCloudModel()API,对应的bundle已在Revit API(非Design Automation环境)中验证可正常运行,当前通过Postman发起请求
错误日志
[06/19/2023 13:50:04] T:\Aces\Jobs\6c520ca0a8984a35b579ad73db46a971\zip_6.zip has been unpacked to folder T:\Aces\Jobs\6c520ca0a8984a35b579ad73db46a971. [06/19/2023 13:50:04] Warning: Zip Migration: the input of 'rvtFile' is unzipped to the correct location of 'T:\Aces\Jobs\6c520ca0a8984a35b579ad73db46a971\unpack_folder_7'. [06/19/2023 13:50:05] End download phase successfully. [06/19/2023 13:50:05] Start preparing script and command line parameters. [06/19/2023 13:50:05] Command line: [ /i "T:\Aces\Jobs\6c520ca0a8984a35b579ad73db46a971\XXXXX_JLG Revit2021 Starter File_A_detached.rvt" /al "T:\Aces\Applications\8ab7ecdf17504804c4d0b05de34b89d4.SAVE_CLOUD_MODEL.SaveModelTest8[1].package"] [06/19/2023 13:50:05] End preparing script and command line parameters. [06/19/2023 13:50:05] Start script phase. [06/19/2023 13:50:05] End script phase. [06/19/2023 13:50:05] Error: An unexpected error happened during phase CoreEngineExecution of job. [06/19/2023 13:50:06] Job finished with result FailedEnvironmentSetup [06/19/2023 13:50:06] Job Status: { "status": "failedDownload",
工作项请求内容
{ "activityId": "SAVE_CLOUD_MODEL.SaveModelTestActivity8+current", "arguments": { "rvtFile": { "verb": "get", "url": "/* INPUT URL (TESTED AND WORKS) */", "pathInZip": "/* WORKING PATH */" }, "result": { "verb": "put", "url": "/*OUTPUT URL (TESTED AND WORKS)*/" }, "adsk3LeggedToken": "{{ouath3}}" } }
解决方法
经排查,问题根源在于Token类型错误:此前误将2Legged Token当作3Legged OAuth Token传入adsk3LeggedToken参数。更换为正确的3Legged OAuth Token后,工作项可正常运行,下载失败与认证问题均得到解决。
内容的提问来源于stack exchange,提问作者Frank P Archi Dev
相关产品推荐
相关产品推荐

