# Integrate with Xai Connect

### Prerequisites

To use the Xai Connect Ecosystem Wallet, you will need to:

* Create a thirdweb account ([link](https://thirdweb.com/dashboard))
  * Navigate to the **Settings** page and create an API key to get your **Client ID**
* Get your ecosystem partner ID from Xai

You can integrate to the Xai Connect Ecosystem Wallet in two different ways:

### Login with Xai Connect only

You can install the thirdweb SDK and use thirdweb’s [ConnectButton](https://portal.thirdweb.com/typescript/v5/react/components/ConnectButton) alongside the Partner ID Xai created for you to display only the Xai branded sign in flow.

```tsx
import { ecosystemWallet } from "thirdweb/wallets";

const restrictedWallet = ecosystemWallet("ecosystem.xai-connect", {
	partnerId: "..." // partner ID provided to you by XAI
});
```

In the React SDK, you may provide the wallet as the only option to restrict user logins to the ecosystem.

```tsx
<ConnectButton
	client={THIRDWEB_CLIENT} /* your own thirdweb API key */
	wallets={[wallet]}
	{...props}
/>
```

### Adding Xai Connect with Other Login Options

You can add Xai Connect as a wallet connector option amongst other wallet options in your existing sign in flow on any domains whitelisted under the ecosystem.

In this example, a partner game might be using thirdweb’s in-app wallet and wants to include Xai Connect as another login option for users.

```tsx
<ConnectButton
	client={THIRDWEB_CLIENT} /* your own thirdweb API key */
	wallets={[inAppWallet(), createWallet("io.metamask"), createWallet("ecosystem.xai.connect")]}
	{...props}
/>
```


---

# 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://xai-foundation.gitbook.io/xai-network/en/xai-gaming-dev-resources/xai-connect/integrate-with-xai-connect.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.
