> For the complete documentation index, see [llms.txt](https://docs.sudoplatform.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sudoplatform.com/guides/site-reputation/integrate-the-site-reputation-sdk.md).

# Integrate the Site Reputation SDK

## Prerequisites

1. [Complete the Getting Started Guide](/guides/getting-started.md)
2. [Integrate the User SDK](/guides/users/integrate-the-user-sdk.md)

## Get Started

* [Integrate the JS SDK](#integrate-the-js-sdk)
* [Integrate the iOS SDK](#integrate-the-ios-sdk)
* [Integrate the Android SDK](#integrate-the-android-sdk)

## Integrate the JS SDK

Add `@sudoplatform/sudo-site-reputation` as a dependency to your project.

```bash
yarn add '@sudoplatform/sudo-site-reputation'
# or
npm install --save '@sudoplatform/sudo-site-reputation'
```

{% hint style="info" %}
In order to instantiate a Site Reputation client, make sure you have followed instructions for [Getting Started](/guides/getting-started.md) and [User SDK](/guides/users/integrate-the-user-sdk.md) (see [Prerequisites](#prerequisites) above).
{% endhint %}

To instantiate a client in your application, add the following:

{% tabs %}
{% tab title="TypeScript" %}

```typescript
import { SudoSiteReputationClient } from '@sudoplatform/sudo-site-reputation'
import { DefaultSudoUserClient } from '@sudoplatform/sudo-user'

// See User SDK docs
const sudoUserClient = new DefaultSudoUserClient()

const siteReputationClient = new SudoSiteReputationClient({
  sudoUserClient, 
})
```

{% endtab %}
{% endtabs %}

## Integrate the iOS SDK

Add this line to your [Podfile](/guides/getting-started.md#ios-only-setup-cocoapods-in-a-project):

```swift
pod 'SudoSiteReputation'
```

Install pod dependencies by running the following command in your project directory:

```swift
pod install --repo-update
```

This will update the local CocoaPods repository and install the latest version of the Site Reputation SDK.

{% hint style="info" %}
In order to instantiate a Site Reputation client, make sure you have followed instructions for [Getting Started](/guides/getting-started.md) and [User SDK](/guides/users/integrate-the-user-sdk.md) (see [Prerequisites](#prerequisites) above).
{% endhint %}

To instantiate a client in your application, add the following:

{% tabs %}
{% tab title="Swift" %}

```swift
import SudoUser
import SudoSiteReputation

let userClient: SudoUserClient = // ... see "Users" docs
let siteReputationClient = try DefaultSudoSiteReputationClient(
    userClient: userClient
)
```

{% endtab %}
{% endtabs %}

{% hint style="warning" %}
You only need one client instance for a given user per device. Instantiating multiple clients with the same configuration and using them at the same time may cause unexpected runtime errors to occur.
{% endhint %}

{% hint style="success" %}
**See it in action.** Be sure to take a look at the [open-source iOS sample app](https://github.com/sudoplatform/samples-ios/tree/master/site-reputation) on GitHub that our team published as a reference for integrating the Sudo Site Reputation SDK into your app as quickly and seamlessly as possible.
{% endhint %}

## Integrate the Android SDK

Add this line to the dependencies section of the app module `build.gradle` and run Gradle sync.

```kotlin
dependencies {
    api 'com.sudoplatform:sudositereputation:2.0.0'
}
```

{% hint style="info" %}
In order to instantiate a Site Reputation client, make sure you have followed instructions for [Getting Started](/guides/getting-started.md) and [User SDK](/guides/users/integrate-the-user-sdk.md) (see [Prerequisites](#prerequisites) above).
{% endhint %}

To instantiate a client in your application, add the following:

{% tabs %}
{% tab title="Kotlin" %}

```kotlin
val userClient: SudoUserClient = // ... see "Users" docs

val sudoSiteReputationClient = SudoSiteReputationClient.builder()
            .setContext(this)
            .setSudoUserClient(sudoUserClient)
            .build()
```

{% endtab %}
{% endtabs %}

{% hint style="warning" %}
You only need one client instance for a given user per device. Instantiating multiple clients with the same configuration and using them at the same time may cause unexpected runtime errors to occur.
{% endhint %}

{% hint style="success" %}
**See it in action.** Be sure to take a look at the [open source Android sample app](https://github.com/sudoplatform/samples-android/tree/master/site-reputation) on GitHub that our team published as a reference for integrating the Sudo Site Reputation SDK into your app as quickly and seamlessly as possible.
{% endhint %}


---

# 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.sudoplatform.com/guides/site-reputation/integrate-the-site-reputation-sdk.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.
