public static BoxDeveloperEditionAPIConnection userClient(String userId) {
        if (userId == null) { //   session data has expired
            return null;
        }
        System.out.format("userClient called with userId %s \n\n", userId);
        try {
            BoxDeveloperEditionAPIConnection userClient = BoxDeveloperEditionAPIConnection.getAppUserConnection(
                    userId, CLIENT_ID, CLIENT_SECRET, jwtEncryptionPreferences, accessTokenCache);
            return userClient;
        } catch (BoxAPIException apiException) {
            apiException.printStackTrace();
            throw apiException;
        }
    }
public static BoxDeveloperEditionAPIConnection userClient(String userId) {
        if (userId == null) { 
            return null;
        }
        System.out.format("userClient called with userId %s \n\n", userId);
        try {
            BoxDeveloperEditionAPIConnection userClient = BoxDeveloperEditionAPIConnection.getAppUserConnection(
                    userId, CLIENT_ID, CLIENT_SECRET, jwtEncryptionPreferences, accessTokenCache);
            return userClient;
        } catch (BoxAPIException apiException) {
            apiException.printStackTrace();
            throw apiException;
        }
    }
public static BoxDeveloperEditionAPIConnection userClient ( String userId ) { if ( userId == null ) { //   session data has expired return null ; } System . out . format ( "userClient called with userId %s \n\n" , userId ) ; try { BoxDeveloperEditionAPIConnection userClient = BoxDeveloperEditionAPIConnection . getAppUserConnection ( userId , CLIENT_ID , CLIENT_SECRET , jwtEncryptionPreferences , accessTokenCache ) ; return userClient ; } catch ( BoxAPIException apiException ) { apiException . printStackTrace ( ) ; throw apiException ; } }
Get a BoxDeveloperEditionAPIConnection that can be used by an App user to access Box.

@param userId The UserId of a valid Box App User
@return BoxDeveloperEditionAPIConnection new Box Developer Edition connection with App User token
Get a BoxDeveloperEditionAPIConnection that can be used by an App user to access Box .