UNPKG

forge-server-utils

Version:

Tools for accessing Autodesk Forge APIs from Node.js apps and from browser.

10 lines (8 loc) 389 B
# Basic usage of Authentication APIs ```js const { AuthenticationClient } = require('forge-server-utils'); const { FORGE_CLIENT_ID, FORGE_CLIENT_SECRET } = process.env; const auth = new AuthenticationClient(FORGE_CLIENT_ID, FORGE_CLIENT_SECRET); const authentication = await auth.authenticate(['bucket:read', 'data:read']); console.log('2-legged Token', authentication.access_token); ```