• Validate a token. Only Verdocs tokens will be accepted. Most applications can decode tokens locally, because tokens will be validated when API calls are made anyway. However, high-security applications may use this endpoint to check if a token has been revoked.

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

    const {valid} = await Auth.validateToken({ token });
    if (!valid) {
    window.alert('Session invalid or expired. Please re-authenticate.');
    }

    Parameters

    Returns Promise<TokenValidationResponse>