@ambassadorai/feedback-webview

A package that can be included in the chat webview component, or the Messenger webview host. You should pass one of either `token` or `signedRequest` depending on the environment.

Usage no npm install needed!

<script type="module">
  import ambassadoraiFeedbackWebview from 'https://cdn.skypack.dev/@ambassadorai/feedback-webview';
</script>

README

Feedback webview

A package that can be included in the chat webview component, or the Messenger webview host. You should pass one of either token or signedRequest depending on the environment.

Testing

Create an .env file and add the following environment variables:

  • API_URL: URL to /webview/feedback API endpoint in the dashboard.
  • CHAT_TOKEN: JWT provided by the chat app.
  • WEBVIEW_APP_ID - (Optional) ID for a specific webview app to get options from.

Run npm run watch and visit http://localhost:9004.