Skip to main content
The Miso Answers SDK provides hooks that you can use to trigger and integrate with your own or third‑party JavaScript functions. These hooks allow you to extend how answers behave, whether by listening to API responses, intercepting answer links, or integrating with external systems like Piano.

Data Hooks

The SDK provides a series of data hooks that your code can listen to. Reference: Miso SDK — Answers Events

Example: Data Event

This event fires whenever the SDK receives a response from the Miso API.
Another way to trigger custom logic is by listening to link click events inside answers. This is especially useful when Miso responses contain messages such as:
  • You’ve reached your usage limit, please sign in or register to continue.
  • Conditional messages with static URLs like https://example.com/#miso-reg-click.
By intercepting these links, you can override default navigation and trigger your own logic.
Below is a complete example where clicking a #miso-reg-click link triggers Piano’s loginRequired handler automatically:

Summary

  • Data hooks let you monitor API responses in real time.
  • Answer link clicking hooks let you intercept links such as sign in or register.
  • Piano integration inside the listener allows you to seamlessly redirect users into a dedicated login or registration flow when they click inside an Answer.