All URIs are relative to https://developer.api.autodesk.com/
Method | HTTP request | Description |
---|---|---|
authenticate | POST /authentication/v1/authenticate | POST authenticate |
Bearer authenticate(clientId, clientSecret, grantType, opts)
POST authenticate
Get a two-legged access token by providing your app's client ID and secret.
var ForgeOauth2 = require('forge-oauth2');
var apiInstance = new ForgeOauth2.TwoLeggedApi();
var clientId = "clientId_example"; // String | Client ID of the app
var clientSecret = "clientSecret_example"; // String | Client secret of the app
var grantType = "client_credentials"; // String | Must be ``client_credentials``
var opts = {
'scope': "scope_example", // String | Space-separated list of required scopes Note: A URL-encoded space is* ``%20``. See the* `Scopes </en/docs/oauth/v2/overview/scopes>` *page for more information on when scopes are required.
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.authenticate(clientId, clientSecret, grantType, opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
clientId | String | Client ID of the app | |
clientSecret | String | Client secret of the app | |
grantType | String | Must be ``client_credentials`` | [default to client_credentials] |
scope | String | Space-separated list of required scopes Note: A URL-encoded space is* ``%20``. See the* `Scopes </en/docs/oauth/v2/overview/scopes>` *page for more information on when scopes are required. | [optional] |
No authorization required
- Content-Type: application/x-www-form-urlencoded
- Accept: application/json