Getting Started
Welcome! This guide walks you through the minimum 3 steps to get Octopus SDK running in your app.
- Step 1: Request your API key
- Step 2: Install the SDK
- Step 3: Display the UI
1) Get an API Key
Fill out the form to request your API key. Required fields: Email, First Name, Last Name. Company is optional.
Request an API Key
Fill in the details to receive your sandbox API key.
2) Install the SDK
Choose your platform and install the SDK:
- Android
- iOS
Add Maven Central and the dependency in your Gradle files:
// build.gradle (project)
allprojects {
repositories {
google()
mavenCentral()
}
}
// build.gradle (module)
dependencies {
implementation("com.octopus:octopus-sdk:<latest>")
}
Initialize the SDK early in your app (e.g., Application):
class MyApp : Application() {
override fun onCreate() {
super.onCreate()
OctopusSDK.init(
context = this,
apiKey = BuildConfig.OCTOPUS_API_KEY // store securely
)
}
}
Install via Swift Package Manager:
# Xcode → File → Add Package Dependencies…
# https://github.com/octopuscommunity/octopus-ios-sdk
Initialize at startup:
import OctopusSDK
@main
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
OctopusSDK.initialize(apiKey: Bundle.main.object(forInfoDictionaryKey: "OCTOPUS_API_KEY") as? String ?? "")
return true
}
}
Replace
<latest>with the current version and inject your API key via secure config.
3) Display the UI
Once the SDK is installed and initialized, present the community UI:
- Android
- iOS
From an Activity or Fragment:
OctopusSDK.displayCommunity(context = this)
From a UIViewController / SwiftUI host:
OctopusSDK.displayCommunity(from: self)