> For the complete documentation index, see [llms.txt](https://docs.wepin.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wepin.io/en/widget-integration/react-native-sdk/login-library/initialization.md).

# Initialization

After installing the Wepin React Native 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 React Native Login Library, you first need to import the SDK. Add the following import statements:

```dart
import WepinLogin from '@wepin/login-rn'
```

## 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/dQiDmklSBMcztyymHWPu" %}
[App Registration and Key Issuance](/en/wepin/workspace/app-registration-and-key-issuance.md)
{% endcontent-ref %}

Use the registered app information to create a `WepinLogin` instance and initialize it by calling `init()`.

```typescript
const wepinLogin = new WepinLogin({
  appId: 'wepinAppId',
  appKey: 'wepinAppKey',
});

await wepinLogin.init()
```

## Checking Initialization Status (isInitialized)

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

The return value is as follows:

* **boolean**
  * Returns `true` if initialization was successful, and `false` if it failed.

#### **Example**

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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.wepin.io/en/widget-integration/react-native-sdk/login-library/initialization.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
