cyrillef / extract.autodesk.io

A sample showing how to extract viewables from the Autodesk OSS storage to your local machine
MIT License
118 stars 74 forks source link

Failed to create bucket! #5

Closed afshinjafari closed 7 years ago

afshinjafari commented 7 years ago

Hi, Thank you for providing the code. Following your instructions I installed this and set the parameters. however when I try to upload a model I get these messages on the server side:

Token: {"access_token":"XbnQtu7LnWgJGvNnEVcZy6IrdMDH","token_type":"Bearer","expires_in":86399}

POST done test.nwc 3239-testnwc master: 3239-testnwc Failed to create bucket!undefined async uploading(s) async uploading 3239-testnwc Failed to upload 3239-testnwc Something wrong happened during upload

any help will be appreciated.

afshinjafari commented 7 years ago

In case someone else had this problem, solution is to add scope to 'credentials.js':

credentials: { // Replace placeholder below by the Consumer Key and Consumer Secret you got from // http://developer.autodesk.com/ for the production server client_id: process.env.CONSUMERKEY || '****', client_secret: process.env.CONSUMERSECRET || '****', grant_type: 'client_credentials', scope: 'data:read data:write bucket:create bucket:read' },