+ Start a Discussion

Auth.AuthToken.getAccessToken returning null value

String accessToken = Auth.AuthToken.getAccessToken(authProviderId, 'Open ID connect');
        system.debug('Access Token is ' + accessToken);

here authProviderId has my Auth. Provider id.

It is returning null value.
Which provider are you trying to connect to? also can you try using "open id connect" all smalls? If its google API generally, the token gets expired, so you need to call refreshAuthToken() method. 
@logontokartik - I am using Facebook provider.

Do u have sample code?