How to get token for logged in user on the frontend

New Member
1 0 0

I am trying to build a webchat that uses the logged in user's identity to help the agents with, for example, latest orders. Is there any way for my server to verify this request is indeed coming from a certain user's logged in account? Thanks in advance