get the session from an api endpoint instead of creating