> 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/telephony/integrate-the-telephony-sdk.md).

# Integrate the Telephony SDK

Integrate the Telephony SDK into your application.

## Prerequisites

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

## Get Started

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

## Integrate the JS SDK

To use the **Telephony SDK** in a Web or Node.js project, you must add `@sudoplatform/sudo-telephony` as a dependency to your project.

```js
yarn add '@sudoplatform/sudo-telephony'
# or
npm install --save '@sudoplatform/sudo-telephony'
```

{% hint style="info" %}
In order to instantiate an Telephony client, make sure you have followed instructions for [Getting Started](https://docs.sudoplatform.com/guides/getting-started), [User SDK](https://docs.sudoplatform.com/guides/users/integrate-the-user-sdk) and [Sudo Profiles SDK](https://docs.sudoplatform.com/guides/sudos/integrate-the-sudo-sdk) (see [Prerequisites](https://docs.sudoplatform.com/guides/email/integrate-the-email-sdk#prerequisites) above).
{% endhint %}

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

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

```javascript
import { DefaultApiClientManager } from '@sudoplatform/sudo-api-client'
import { DefaultConfigurationManager } from '@sudoplatform/sudo-common'
import { DefaultSudoTelephonyClient } from '@sudoplatform/sudo-telephony'
import { DefaultSudoProfilesClient } from '@sudoplatform/sudo-profiles'
import { DefaultSudoUserClient } from '@sudoplatform/sudo-user'

const sdkConfigJSON = /* ... refer to Users documentation ... */
DefaultConfigurationManager.getInstance().setConfig(sdkConfigJSON)

const userClient = new DefaultSudoUserClient(/* refer to Users documentation */)
const profilesClient = new DefaultSudoProfilesClient(/* refer to Sudos documentation */)
const apiClientManager = DefaultApiClientManager.getInstance().setAuthClient(userClient)

const telephonyClient = new SudoTelephonyClient(
    apiClientManager
    userClient,
    profilesClient,
)
```

{% endtab %}
{% endtabs %}

## Integrate the iOS SDK

To use the **Telephony SDK** in an iOS app, you need to install the SudoTelephony package via Swift Package Manager

Open your project settings in XCode, and go to the `Package Dependencies` tab. Click on the `+` sign to add a dependency.

Enter the repository URL [`https://github.com/sudoplatform/sudo-telephony-ios`](https://github.com/sudoplatform/sudo-telephony-ios) in the top right search box and select the `sudo-telephony-ios` repository.

Select the required version and `Add Package`.

Sudo Platform SDKs conform to semantic versioning so in most cases you will leave the Dependency Rule as `Up to Next Major Version` to receive regular updates without introducing any breaking changes.

This will resolve the local package dependency and install the latest version of the Telephony SDK.

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

To instantiate a client in your application, add the following

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

```swift
import SudoTelephony
import SudoUser

let userClient = // ... see "Users" docs

let telephonyClient = try DefaultSudoTelephonyClient(
    keyNameSpace: "MyNameSpace",
    sudoUserClient: 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) on GitHub that our team published as a reference for integrating the Telephony SDK into your app as quickly and seamlessly as possible.
{% endhint %}

## Integrate the Android SDK

The Android SDK is open source and compatible with Android 7 (API level 24) and above.

{% tabs %}
{% tab title="Gradle" %}
Add this line to the dependencies section of the app module `build.gradle` and synchronize your project with Android Studio.<a class="button secondary">Copy</a>

```kotlin
dependencies {
    implementation 'com.sudoplatform:sudotelephony:$latest_version'
}
```

The latest version of the SDK can be found at [SDK Releases](https://docs.sudoplatform.com/guides/telephony/sdk-releases).
{% endtab %}
{% endtabs %}

{% hint style="info" %}
In order to instantiate an Telephony client, make sure you have followed instructions for [Getting Started](https://docs.sudoplatform.com/guides/getting-started) and [User SDK](https://docs.sudoplatform.com/guides/users/integrate-the-user-sdk) and [Sudo Profiles SDK ](https://docs.sudoplatform.com/guides/sudos/integrate-the-sudo-sdk)(see Prerequisities above)
{% endhint %}

{% 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/telephony) on GitHub that our team published as a reference for integrating the Telephony SDK into your app as quickly and seamlessly as possible.
{% endhint %}
