session_invalid ยท 401
Send the embed session POST /embed/sessions answered, as Authorization: Bearer <session>. One that was never made, whose person was erased, or whose identity provider or signing key was removed is refused the same way: ask for a new one. On your chat app, a sign-in that ended is refused so too: sign in again.
The API answers this problem as application/problem+json, with this page as its type and
session_invalid as its code. Every call is in the API's document.