Zero-config Feedback

Automatic Feedback with Client Tokens

When using a client token, feedback (upvotes, downvotes, copies) is automatically sent to your Travrse backend. No custom code needed!

← Back to examples

The Magic

🎯 Just Enable the Buttons

With clientToken mode, simply set showUpvote: true and showDownvote: true. The SDK handles sending feedback to your backend automatically!

❌ Without Client Token (Manual) More Code
messageActions: { showUpvote: true, showDownvote: true, // You must implement this yourself: onFeedback: async (feedback) => { await fetch('/api/feedback', { method: 'POST', body: JSON.stringify({ type: feedback.type, messageId: feedback.messageId, }) }); } }
✅ With Client Token (Automatic) That's It!
clientToken: 'ct_live_...', messageActions: { showUpvote: true, showDownvote: true, // That's it! Feedback is sent automatically. // onFeedback is optional for extra handling. }
  • Upvote/Downvote – Automatically POSTs to /v1/client/feedback
  • Copy – Copy events are tracked too, helping you understand engagement
  • Optional Override – Add onFeedback callback for additional local handling
  • Session Aware – Feedback includes session ID for proper attribution
🔑

Try It

Enter a client token to begin
API Requests (feedback)
Feedback requests will appear here when you upvote, downvote, or copy messages.
💬

Live Demo

💬
Enter a client token and click "Initialize Widget" to start