Comments (8)
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.
@nasushkov - How exactly did you obtain your access token? What scopes have you used?
from forge-api-nodejs-client.
@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.
@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.
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.
@nasushkov: Did you find a solution with 2-legged authentication? I'm in the same boat.
from forge-api-nodejs-client.
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.
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)
- getObject and arraybuffer
- APS.DerivativesApi().getManifest always return 0% progress HOT 1
- uploadResources failing for larger models
- Missing option hookExpiry in CreateSystemHook opts HOT 1
- depends on insecure axios HOT 1
- getUserProfile is soon depreciated API
- getDerivativeManifest is not returning the file correctly
- ObjectsApi.uploadObject set x-ads-content-sha1 header HOT 2
- Oder by version should be implemented or fixed
- ApiClient Default Headers HOT 1
- Tutorial for Forge API for NestJS HOT 1
- ItemsAPI.postItem Generates 400 Error
- Planning for Direct-to-S3 approach HOT 6
- getObject returns empty body HOT 1
- Expose ApiClient's callApi function (Feature Request) HOT 1
- Add support for Node.js ESM
- Support for typescript as @types/forge-apis is outdated HOT 2
- DerivativesApi().getThumbnail() encodes the result to string HOT 1
- ObjectsApi.downloadResources throws an error
- `data:read:<URN_OF_RESOURCE>` auth scopes are not supported
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from forge-api-nodejs-client.