Trying to close web messaging sessions programmatically from our backend to clean up OTel traces. Calling POST /api/v2/webmessaging/sessions/{sessionId}/close with a service account token. Getting a 403 Forbidden.
The account has webmessaging:session:write scope. Works fine for creating sessions. The session ID is valid and active.
Is there a specific permission needed for closing? Or is this endpoint restricted to the guest token only?
If that still 403s, verify the service account user role has the “Web Messaging Administrator” feature enabled. Sometimes the scope is there but the user profile blocks the action.