awaitConnect

suspend fun SendbirdChat.awaitConnect(userId: String, authToken: String? = null, apiHost: String? = null, wsHost: String? = null): AuthUser

Connects to SendbirdChat with given User ID and auth token. If you have created Users without auth token, pass authToken with null.

Return

The AuthUser object of the current user and the socket connection state.

Since

4.17.0

Parameters

userId

User ID to connect with. Refer to User.userId.

authToken

Auth token. It should not be saved on the client side.

apiHost

Custom API Host. Internal use only.

wsHost

Custom WS Host. Internal use only.