Code Monkey home page Code Monkey logo

Comments (8)

augustogoncalves avatar augustogoncalves commented on August 11, 2024 2

For BIM 360 Hubs you need a 3-legged token, obtained from the user (via login page). The 2-legged workflow works for BIM 360 HQ (meaning to access admin endpoints listed here)

from forge-api-nodejs-client.

gregra81 avatar gregra81 commented on August 11, 2024

@nasushkov - How exactly did you obtain your access token? What scopes have you used?

from forge-api-nodejs-client.

nasushkov avatar nasushkov commented on August 11, 2024

@gregra81 Here it is:
POST https://developer.api.autodesk.com/authentication/v1/authenticate

Headers:
Content-Type: application/x-www-form-urlencoded

Body:
grant_type: client_credentials
client_id: {{ConsumerKey}}
client_secret: {{ConsumerSecret}}
scope: data:read data:write data:create data:search bucket:create bucket:read bucket:update bucket:delete code:all account:read account:write user-profile:read viewables:read

from forge-api-nodejs-client.

gregra81 avatar gregra81 commented on August 11, 2024

@nasushkov - This is how you obtain a 3-legged token: https://github.com/Autodesk-Forge/forge-api-nodejs-client#3-legged-token

from forge-api-nodejs-client.

nasushkov avatar nasushkov commented on August 11, 2024

Thanks, @augustogoncalves, @gregra81 with 3-legged it works. But is there any way to access user data with 2-legged token? I ask this because my current workflow is the following: user uploads files to the project and then my service processes them in the background. So, is there any way to give an access to this data with 2-legged or I still need to obtain user permission somehow?

from forge-api-nodejs-client.

mrdaliri avatar mrdaliri commented on August 11, 2024

@nasushkov: Did you find a solution with 2-legged authentication? I'm in the same boat.

from forge-api-nodejs-client.

cyrillef avatar cyrillef commented on August 11, 2024

2 legged is working, but you need 3 things to have it work properly.

a- if your BIM360 account is less than 100 users, you need to ask the API to be enabled on that account - sending an email to [email protected] for activating the API.
b- you need to provision your Forge client ID on the BIM360 account
c- when using 2 legged, you need to pass an user' oxygen ID in the header. When using the API, add a xuserid parameter. See here on the implementation detail.

I am using 2 and 3 legged in the node-red project without any issue. However, note that 2 legged will not give you the same level of access compared to 3legged.

from forge-api-nodejs-client.

klompenrunner avatar klompenrunner commented on August 11, 2024

This is the most up to date answer now: https://aps.autodesk.com/blog/errors-when-retrieving-hubs

from forge-api-nodejs-client.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.