# Initialization

After installing the Wepin Compose Multiplatform Login Library, the next step is to initialize the SDK. SDK initialization involves creating an instance of `WepinLogin` and using the `init()` function to proceed.

## Import SDK

To use the Wepin Compose Multiplatform Login Library, you first need to import the SDK. Add the following import statements:

```kotlin
import com.wepin.cm.loginlib.WepinLogin
import com.wepin.cm.loginlib.types.*
```

## **Creating and Initializing the `WepinLogin` Instance**

Before creating an instance of `WepinLogin`, you must register your app's Android/iOS information in the Wepin Workspace.

{% content-ref url="/pages/cfg4nwJBI8VfiJpH4EW8" %}
[Workspace](/en/wepin/workspace.md)
{% endcontent-ref %}

Using the registered app information, create an instance of `WepinLogin`.

```kotlin
private val wepinLogin: WepinLogin = WepinLogin(
    WepinLoginOptions(
        context = context,    //Android: Context, ios: UIViewController
        appId = appId,
        appKey = appKey
    )
)
wepinLogin.init()
```

## **Checking Initialization Status (isInitialized)**

You can check whether the `WepinLogin` instance has been successfully initialized by using the `isInitialized` method. &#x20;

The return value is as follows:

* **\<Boolean>**\
  Returns `true` if initialization was successful, and `false` if it failed.

```dart
if(wepinLogin.isInitialized()) {
    // Success to initialize WepinLogin
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wepin.io/en/widget-integration/compose-multiplatform-sdk/login-library/initialization.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
