I have created a viewer application which uses 2-legged authentication and displays the project that has been uploaded to my own bucket. Now instead of viewing the project in my own bucket, I would like to be able to view a project that has been already uploaded to Autodesk A360.
For that I have completed the following steps:
- Implemented the 3-legged authentication (A360 account with the project and the account that is being authenticated are the same).
- Accessed the hub, project and the file, as described in https://developer.autodesk.com/en/docs/data/v2/tutorials/download-file/.
- Instead of downloading the project and uploading it to my own bucket, as described in https://developer.autodesk.com/en/docs/data/v2/tutorials/app-managed-bucket/, gotten the identificator
(
urn:adsk.wipprod:fs.file:vf.6bVr4EVDSaOpykczeQYR2Q?version=1
) from the result of the file request and converted it to an URL-friendly Base64 (dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6bXktYnVja2V0L215LWF3ZXNvbWUtZm9yZ2UtZmlsZS5ydnQ=
).
As a result, the converted URN should be the same as A360 is using for its own viewer.
When viewing the project with the URN on my own application, the network console is displaying the following error message:
When looking at the specific request, the following response is returned:
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:
So as the viewer works in A360, I would like to know whether the project in A360 can be also viewed in my own application (the bucket already exists for the A360 viewer, so there is no reason for repeating the same process of bucket creation and uploading of the file). If the same project with the URN can be used, then I would also like to know why the request is unauthorized.
If you need any additional code, then make sure to ask.