Keycloak JS adapter question

I’m trying to get user info from existing valid token

Here is my init call on js adapter.

token: access_token,
refreshToken: refresh_token,
checkLoginIframe: false
}).success((authenticated) => {
}).error((err) => {

Prints error-> undefined

Does init function need anything else to be successfully authenticated?
Realm and auth server endpoint are correct.

If I add onload: ‘login-required’
It shows login screen which I dont want.

I’m trying to avoid manual endpoints.