Initializes new client with specific Forge app credentials.
Forge application client ID.
Forge application client secret.
Optional
host: string = 'https://developer.api.autodesk.com'Forge API host.
Private
_cachedPrivate
client_Private
client_Private
hostRetrieves 2-legged access token for a specific set of scopes (https://forge.autodesk.com/en/docs/oauth/v2/reference/http/authenticate-POST|docs). Unless the {@see force} parameter is used, the access tokens are cached based on their scopes and the 'expires_in' field in the response.
List of requested https://forge.autodesk.com/en/docs/oauth/v2/developers_guide/scopes|scopes.
Optional
force: boolean = falseSkip cache, if there is any, and retrieve a new token.
Promise of 2-legged authentication object containing two fields, 'access_token' with the actual token, and 'expires_in' with expiration time (in seconds).
Generates a URL for 3-legged authentication.
List of requested https://forge.autodesk.com/en/docs/oauth/v2/developers_guide/scopes|scopes.
Same redirect URI as defined by the Forge app.
Autodesk login URL.
Exchanges 3-legged authentication code for an access token (https://forge.autodesk.com/en/docs/oauth/v2/reference/http/gettoken-POST|docs).
Authentication code returned from the Autodesk login process.
Same redirect URI as defined by the Forge app.
Promise of 3-legged authentication object containing 'access_token', 'refresh_token', and 'expires_in' with expiration time (in seconds).
Gets profile information for a user based on their 3-legged auth token (https://forge.autodesk.com/en/docs/oauth/v2/reference/http/users-@me-GET|docs).
3-legged authentication token.
User profile information.
Protected
postRefreshes 3-legged access token (https://forge.autodesk.com/en/docs/oauth/v2/reference/http/refreshtoken-POST).
List of requested https://forge.autodesk.com/en/docs/oauth/v2/developers_guide/scopes|scopes.
Refresh token.
Promise of 3-legged authentication object containing 'access_token', 'refresh_token', and 'expires_in' with expiration time (in seconds).
Generated using TypeDoc
Client providing access to Autodesk Forge APIs.
Tutorial
authentication