Create a webview

Webviews are in-chat webpages that help your users do things that would be difficult or tedious to do via chat bubbles, like filling in a form. They’re written in HTML and JavaScript as single-page apps and can use any CDN or API that allows cross-site scripting.

The webview API allows a webview to store and retrieve user data just like a chatbot script, and to close the webview and start the next passage when the user is finished. When you create a new webview, you start from an example that demonstrates some basic functionality, including webview API calls.

Testing changes to your webview

Changes to your webview are stored in the chatbot's versions. To see changes you make to your webview, you need to Deploy and Publish a new version of the chatbot. See Versions.

Access tokens

All webviews are protected by an access token with a thirty-minute session lifetime, to prevent users reloading old webviews and causing data conflicts. Every API call to the chatbot must include this token as the query parameter accessToken. The token is available as a variable inside the webview (see Webview variables).

If you want to generate an access token to call the chatbot endpoints from outside a webview, you can use a chatbot script to request one. See User functions.

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.