@@ -14,7 +14,7 @@ manually, you can use the `AuthenticationClient` class:
1414
1515``` js
1616const { AuthenticationClient } = require (' forge-nodejs-utils' );
17- const auth = new AuthenticationClient (); // If no params, gets credentials from env. vars FORGE_CLIENT_ID and FORGE_CLIENT_SECRET
17+ const auth = new AuthenticationClient (process . env .FORGE_CLIENT_ID , process . env . FORGE_CLIENT_SECRET );
1818const authentication = await auth .authenticate ([' bucket:read' , ' data:read' ]);
1919console .log (' 2-legged token' , authentication .access_token );
2020```
@@ -33,7 +33,7 @@ const bim360 = new BIM360Client({ token: '...' });
3333
3434``` js
3535const { DataManagementClient } = require (' forge-nodejs-utils' );
36- const data = new DataManagementClient (); // If no params, gets credentials from env. vars FORGE_CLIENT_ID and FORGE_CLIENT_SECRET
36+ const data = new DataManagementClient ({ client_id : process . env .FORGE_CLIENT_ID , client_secret : process . env . FORGE_CLIENT_SECRET });
3737
3838const buckets = await data .listBuckets ();
3939console .log (' Buckets' , buckets .map (bucket => bucket .bucketKey ).join (' ,' ));
@@ -46,7 +46,7 @@ console.log('Objects', objects.map(object => object.objectId).join(','));
4646
4747``` js
4848const { ModelDerivativeClient } = require (' forge-nodejs-utils' );
49- const derivatives = new ModelDerivativeClient (); // If no params, gets credentials from env. vars FORGE_CLIENT_ID and FORGE_CLIENT_SECRET
49+ const derivatives = new ModelDerivativeClient ({ client_id : process . env .FORGE_CLIENT_ID , client_secret : process . env . FORGE_CLIENT_SECRET });
5050const job = await derivatives .submitJob (' <your-document-urn>' , [{ type: ' svf' , views: [' 2d' , ' 3d' ] }]);
5151console .log (' Job' , job);
5252```
@@ -55,7 +55,7 @@ console.log('Job', job);
5555
5656``` js
5757const { DesignAutomationClient , AuthenticationClient } = require (' forge-nodejs-utils' );
58- const client = new DesignAutomationClient (); // If no params, gets credentials from env. vars FORGE_CLIENT_ID and FORGE_CLIENT_SECRET
58+ const client = new DesignAutomationClient ({ client_id : process . env .FORGE_CLIENT_ID , client_secret : process . env . FORGE_CLIENT_SECRET });
5959const bundles = await client .listAppBundles ();
6060console .log (' App bundles' , bundles);
6161```
0 commit comments