What the difference?
What's the difference between these? You can use both anywhere, but which one and why should I prefer? If I'd have a seperate Rest API, then I wouldn't be able to use the first one at all, so would I lose out on anything?
and 
Solution:Jump to solution
auth.api is for server-side usage. it calls the Better Auth API endpoints.
authClient.getSession is for client-side usage.
if you’re using a separate API, you’d typically lose access to the direct server-side method since it isn’t exposed over HTTP in the same way. auth.api provides a bit more performance efficiency on the server by avoiding extra HTTP overhead, while the client method is optimized for browser or external API calls....3 Replies
Solution
auth.api is for server-side usage. it calls the Better Auth API endpoints.
authClient.getSession is for client-side usage.
if you’re using a separate API, you’d typically lose access to the direct server-side method since it isn’t exposed over HTTP in the same way. auth.api provides a bit more performance efficiency on the server by avoiding extra HTTP overhead, while the client method is optimized for browser or external API calls.So I should prefer the server-side usage, but I assume that the performance difference would be negligible in prod
But thanks
yeah sure, its just nice to keep in mind. i do prefer using 
auth.api where i can