Autodesk-Forge / forge-boilers.nodejs

DEPRECATED, please use https://github.com/Autodesk-Forge/learn.forge.viewmodels
http://learnforge.autodesk.io/#/tutorials/viewmodels
MIT License
68 stars 53 forks source link

Error to show the Viewer example #1

Closed khoaho closed 8 years ago

khoaho commented 8 years ago

Hi,

I have 401 (Unauthorized) error to run viewer.html with token getting from POST /authentication/v1/authenticate with scope = data:read

The 401 error is: GET https://developer.api.autodesk.com/viewingservice/v1/dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6bGVlZnNtcC1mb3JnZS1wZXJzL3Rlc3QuZHdm

khoaho commented 8 years ago

I tested the same 401 error with viewingApp.html too. The token in viewingApp.html is replaced with a new 2-legged token.

I even tried multiple scopes data:create, data:read and data:write, but none of them work.

leefsmp commented 8 years ago

You also need to use a URN that has been generated with your own credentials otherwise you will get unauthorised error

khoaho commented 8 years ago

Thank you. The URN is private, not public as I thought. I think it was public before.

leefsmp commented 8 years ago

There is no such thing as a public URN, it is always tied to the set keys that was used to upload/translate/generate the token for viewing