Chat SDK now supports callback URLs on buttons and modals
By Steven Van ·
Callback tokens expire after seven days and cover buttons on adapter-supported platforms, plus modals on Slack and Teams.
Vercel's Chat SDK now supports a callbackUrl prop on buttons and modals. When someone clicks a button or submits a modal, the action data is POSTed to that URL, which can pause a running Workflow until it resumes on the response, letting developers build approval flows without writing an onAction handler.
Callback tokens are bound to the specific button and conversation, expire after seven days, and are consumed on first use, so a repeated click or an attempt to move a token to another conversation does not trigger the callback again. The feature works for buttons on most platforms with an official adapter, and for modals on Slack and Teams. Discord's 100-character custom_id limit and Telegram's 64-byte callback_data limit still apply, so an action ID plus callback token that runs too long will throw a ValidationError.
