我正在尝试建立一个简单的Autodesk Forge应用程序。我想将文件上传到其中并读取该文件,然后分析其数据等。
我已经完成了初始Oauth令牌的设置:
然后运行示例文件,得到以下响应: (我用****替换了所有敏感信息)
**** Got Credentials { access_token: '***************',
token_type: 'Bearer',
expires_in: 3599,
expires_at: 2018-10-20T16:57:45.977Z }
**** Creating bucket if not exist : bimbase_1.'***************',
**** Getting bucket details : bimbase_1.'***************',
**** Create bucket if not exist response: { bucketKey: 'bimbase_1.'***************',',
bucketOwner: ''***************',',
createdDate: 1540049926901,
permissions:
[ { authId: ''***************',', access: 'full' } ],
policyKey: 'temporary' }
**** Getting all buckets
**** Uploading file. bucket:bimbase_1.'***************',
filePath:***************\samples\my-file.extension
**** Get all buckets response:
bimbase_1.***************
**** Upload file response: { bucketKey: 'bimbase_1.***************',
objectId: 'urn:adsk.objects:os.object:bimbase_1.***************/my-file.extension',
objectKey: 'my-file.extension',
sha1: '***************',
size: 0,
contentType: 'application/octet-stream',
location: 'https://developer.api.autodesk.com/oss/v2/buckets/bimbase_1.***************/objects/my-file.extension' }
**** Deleting file from bucket:bimbase_1.***************, filename:my-file.extension
**** Delete file response status code: 200
在此之后,我转到了有关如何upload a file的页面 我尝试在其中运行示例命令:
curl -X GET -H "Authorization: Bearer nFRJxzCD8OOUr7hzBwbr06D76zAT" "https://developer.api.autodesk.com/project/v1/hubs"
过了一会儿,我意识到这将是一个示例文件,因此无法正常工作……所以我想知道我到底在哪里可以找到我的“ Bearer”键而不是nFRJxzCD8OOUr7hzBwbr06D76zAT