Integration guide to integrate Thinkstack chatbot in any platform.
Start Free
Trial
No
Credit Card
Required
Web
Script tag can be used to integrate thinkstack into a website without any coding knowledge. Go to embed tab can copy embed code:
<html>
<head>
</head>
<body>
...Your website code
<script chatbot_id="<chatbot_id>" src="https://app.thinkstack.ai/bot/thinkstackai-loader.min.js"></script>
</body>
</html>
More flexibility
For increased flexibility in chatbot integration, consider
using an
iframe
. This allows customization of styles to meet specific preferences and
provides greater
control over the integration.
<html>
<head>
</head>
<body>
...Your website code
<iframe id="chatbot" src="https://app.thinkstack.ai/bot/index.html?chatbot_id=<chatbot_id>"></iframe>
</body>
</html>
Android / IOS
To incorporate Thinkstack into mobile applications, you can easily employ the webview component or view.
Examples:
Java
import android.os.Bundle;
import android.webkit.WebSettings;
import android.webkit.WebView;
import androidx.appcompat.app.AppCompatActivity;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
WebView webView = findViewById(R.id.webView);
WebSettings webSettings = webView.getSettings();
webSettings.setJavaScriptEnabled(true);
// Enable JavaScript (optional)
webView.getSettings().setJavaScriptEnabled(true);
webView.getSettings().setDomStorageEnabled(true)
webView.loadUrl("https://app.thinkstack.ai/bot/index.html?chatbot_id=");
}
}
Kotlin
import android.os.Bundle
import android.webkit.WebSettings
import android.webkit.WebView
import androidx.appcompat.app.AppCompatActivity
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
val webView: WebView = findViewById(R.id.webView)
val webSettings: WebSettings = webView.settings
webSettings.javaScriptEnabled = true
webSettings.domStorageEnabled = true
webView.loadUrl("https://app.thinkstack.ai/bot/index.html?chatbot_id=")
}
}
Flutter
import 'package:flutter/material.dart';
import 'package:webview_flutter/webview_flutter.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(title: Text('Chatbot Example')),
body: WebView(
initialUrl: 'https://app.thinkstack.ai/bot/index.html?chatbot_id=',
javascriptMode: JavascriptMode.unrestricted,
),
),
);
}
}
Swift
import UIKit
import WebKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
let webView = WKWebView(frame: view.frame)
view.addSubview(webView)
if let url = URL(string: "https://app.thinkstack.ai/bot/index.html?chatbot_id=") {
let request = URLRequest(url: url)
webView.load(request)
}
}
}