Create a new anonymous session object from java action

Hi all, Can someone share code snippet or api reference to create an anonymous user session?
1 answers

Hello Ganesh,

You do not need to create an anonymous user session - one will be created automatically (if anonymous users are enabled) when a user that hasn't authenticated visits your app.

Do you have a special use case for this? Perhaps it'd be worth putting your use case in your description so we can understand better the end goal.

Edit: Try ISession session = Core.initializeGuestSession();

Personally I'd recommend changing the language through a front end widget and redirecting to the anonymous login after - but with the above code you should be able to complete what you want.

You might also need to use session.createContext() to initiate the user's context so you're able to guide it to the right page.