class SpotifyAPICalls {

	public boolean createRefreshToken(String authCode) {
		AuthorizationCodeRequest authorizationCodeRequest = getSpotifyApi().authorizationCode(authCode).build();
		AuthorizationCodeCredentials authCodeCredentials = exceptionHandlingWithResults(
				authorizationCodeRequest::execute);
		if (authCodeCredentials != null) {
			this.userData = new User();
			this.storage.put(SPOTIFY_REFRSHTOKEN_KEY, authCodeCredentials.getRefreshToken());
			this.userData.setRefreshToken(authCodeCredentials.getRefreshToken());
			if (getDevices().length > 0) {
				this.userData.setCurrentDeviceId(getDevices()[0].getId());
			}
			return true;
		}
		return false;
	}

}