+ Using the JS SDK, iOS SDK or Rest API, you can add interactive forms to a Circuit conversation.
+ With forms, you can add buttons or radio and input fields to your messages.
+
+
+
+ Whether you are developing a bot or an app, you can display the form to the conversation and collect the answers from one or several participants.
+ You can then decide to update the message based on the user's feedback.
+
Short examples demonstrating one or more particular APIs. You can view the source, or fork your own stackblitz. A sandbox account is required to run the live examples.
Define a custom OAuth 2.0 redirect_uri for faster OAuth redirect. This will allow the OAuth popup to only load that redirect_uri page, and not the whole SDK.
Provides any state that might be useful to your application upon receipt of the response. The Circuit Server roundtrips this parameter, so your application receives the same value it sent. To mitigate against cross-site request forgery (CSRF), it is strongly recommended to include an anti-forgery token in the state, and confirm it in the response. This parameter is not required but strongly recommended for above mentioned security reasons.
+
+
login_hint
+
email
+
Optional. If your application knows which user is trying to authenticate, it can use this parameter to provide a hint to the Circuit Authentication Server. The server uses the hint to simplify the login flow by prefilling the email field in the sign-in form.
+
+
+
prompt
+
comma delimited string
+
Optional. A comma-delimited (no spaces), case-sensitive list of options for the oauth window.
+
+
disable_email: Disable email field (only applicable if login_hint is provided)
+
disable_switch: Disable ability to switch the account from to Oauth popup
+
disable_caching: Hide the "private computer" checkbox.
+
+
+
@@ -270,6 +286,22 @@
Step 1: Application Requests Authorization Code
Any string
Provides any state that might be useful to your application upon receipt of the response. The Circuit Server roundtrips this parameter, so your application receives the same value it sent. To mitigate against cross-site request forgery (CSRF), it is strongly recommended to include an anti-forgery token in the state, and confirm it in the response.
+
+
login_hint
+
email
+
Optional. If your application knows which user is trying to authenticate, it can use this parameter to provide a hint to the Circuit Authentication Server. The server uses the hint to simplify the login flow by prefilling the email field in the sign-in form.
+
+
+
prompt
+
comma delimited string
+
Optional. A comma-delimited (no spaces), case-sensitive list of options for the oauth window.
+
+
disable_email: Disable email field (only applicable if login_hint is provided)
+
disable_switch: Disable ability to switch the account from to Oauth popup
+
disable_caching: Hide the "private computer" checkbox.
Circuit Incoming Webhooks enable you to easily post content to a given Circuit conversation.
+
+ A webhook is a specific unique URL generated by Circuit for a given user (or bot user) to post to a given conversation.
+
+ In effect, the URL encapsulates the ID of the conversation, the ID of the user posting and the ID of the webhook itself. Posting to this URL does not require authentication. As a result, the URL is meant to keep secret. If it was to shared or revealed, other users could publish on behalf of the webhook owner. In case the URL may have been comprimised, it can be re-generated.
+
+ This design is one of the strength of webhooks as they enable simple (friction less) integrations between applications
+
+
+
+ Pre-requisites
+ Incoming Webhooks are available to all users if the Circuit tenant admin enabled the feature for the tenant in the Circuit administration console.
+
+
+
+ Creating a webhook
+
+
Open the sidebar and click on add an app or the + button
+
Name your incoming webhook and click on Create
+
>You will get the incoming webhook URL, copy it to clipboard
+
You can post to Circuit using this URL curl --insecure -X POST https://yourcircuit.com/rest/v2/webhooks/incoming/1234392e25a0c-c88f-4eab-a27e-f88ccd657d17 -d '{"text": "This is the content of my post"}'
+
+
+
+
+ Formatting
+
+
+ json
+ {
+ "text": "bolditalic"
+ }
+
+
+
+ Circuit supports bold, italic and highlited texts. It supports line breaks and ordered and lists with bullet points and numbered items. See the code below for examples :
+
+
+
+ json
+ {
+ "text" : "Circuit supports highlighted text and line breaks.
+ It also supports bullet lists and numbered lists with
item1
item2
and >
item1
item2
."
+ }
+
+
+
+
+
+ Example
+ circuit-call-me-button
+ In this example, a page presents a form where users can enter their name and contact details. Upon submitting, a message is posted to a Circuit conversation so that Circuit participants can see incoming requests and get back to end users.
+
+
+
+