Ending a User Session

The End User Session API explicitly allows you to terminate an end user's active session in your Talkdesk Identity instance.

When to Use This Endpoint

This endpoint is used to force a user logout, programmatically control user sessions, or terminate user access across multiple devices.

Prerequisites

Before using this endpoint:

  • You must have a valid OAuth 2.0 access token.
  • The token must include the scope: user-session-public: end
  • You must know the user ID (exactly 24 characters).

Choose the Right Base URL

Use the base URL that matches your region:

RegionBase URL Template
EUhttps://{account}.talkdeskid.eu
Canada (CA)https://{account}.talkdeskidca.com
Australia (AU)https://{account}.talkdeskid.au
Default (US/global)https://{account}.talkdeskid.com

Replace {account} with your actual Talkdesk account name.

Make the API Call

Endpoint

  • POST /oauth/end_user_session

Full Example URL

Headers

  • Authorization: Bearer YOUR_ACCESS_TOKEN
  • Content-Type: application/x-www-form-urlencoded

Form Data Parameters

ParameterRequiredDescription
user_idYesThe unique identifier of the user whose session you want to terminate. This must be exactly 24 characters.
reasonNoA human-readable or machine-readable reason for session termination. Currently, only one value is supported: force_logout.

Sample Request

curl -X POST https://yourcompany.talkdeskid.com/oauth/end_user_session \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "user_id=1234567890abcdef12345678" \
  -d "reason=force_logout"

👍

API Reference

End User Session

📘

Troubleshooting

If you have questions or technical issues, please open a ticket using this form.