Live SDKs Android v1
Live SDKs Android
Live SDKs
Android
Version 1

Authentication

Copy link

In order to use Sendbird Live SDK in a client app, initialize the SDK with your Sendbird application ID when you first launch the client app. You can find your application ID on Sendbird Dashboard.

class BaseApplication : Application() {
   override fun onCreate() {
       super.onCreate()
       SendbirdLive.init(applicationContext, "APP_ID")
   }
}

Once you’ve authenticated the client app, authenticate a user by calling the SendbirdLive.authenticate() method. Calling this method also authenticates the user with Sendbird Chat SDK which provides the chat functionality during a live event.

private fun signIn() {
   val params = AuthenticateParams(USER_ID, ACCESS_TOKEN)
   SendbirdLive.authenticate(params) { user, e ->
       if (e != null) {
           return@authenticate
       }
       // A user is successfully created.
   }
}