• Authenticate to Verdocs via client ID / Secret authentication. NOTE: This is only suitable for NodeJS server-side applications. Never expose your Client Secret in a Web or Mobile app! Also note that access tokens may be cached by server-side apps (and this is recommended) but do expire after 2 hours. This expiration may change based on future security needs. Application developers are encouraged to check the exp expiration field in the response accessToken and renew tokens after they expire.

    import {Auth} from '@verdocs/js-sdk/Auth';
    import {Transport} from '@verdocs/js-sdk/HTTP';

    const {accessToken} = await Auth.authenticateApp({ client_id: 'CLIENTID', client_secret: 'SECRET' });
    Transport.setAuthToken(accessToken);

    Parameters

    Returns Promise<IAuthenticateResponse>