# Setup & Authentication

## Compatibility

We are always working to enhance our existing UIKit. As a result, the minimum compatibility may vary for our previous version releases. Below is the compatibility list for our latest release. For a complete compatibility history of any given UIKit version, you may refer to our [changelogs](/social-plus-uikit/changelogs/changelog-1.md).

* Glide - 4.12.0
* OKHTTP3 - 4.9.02
* Retrofit2 - 2.9.1
* Android Paging Data Library - 3.1.1
* Room - 2.5.1
* RxJava3 - 3.1.5
* Gson - 2.8.10
* Kotlin-std-lib - 1.7.20
* Kotlin-coroutines - 1.5.0
* Media 3 - 1.1.0
* HiveMQ mqtt client - 1.3.1

## Initialize the SDK

Before using the SDK, you need to initialize the SDK with your API key. Please find your account API key in[ social.plus Cloud Console.](https://portal.amity.co/login)

After logging in Console:

1. Click **Settings** to expand the menu.
2. Select **Security**.
3. On the **Security** page, you can find the API key in the **Keys** section.

![API key in Security page](/files/m5NJMAaNZJ8Ilaz8rpdV)

{% embed url="<https://gist.github.com/amythee/63fb4a2fcb01ec2a4139d9041a9663f6>" %}

You can specify endpoints manually via optional parameters. API endpoints for each data center are different so you need to adjust the endpoint accordingly.

We currently support multi-data center capabilities for the following regions:

|     Region    |         Endpoint         |   Endpoint URL  |
| :-----------: | :----------------------: | :-------------: |
|     Europe    | AmityRegionalEndpoint.EU | api.eu.amity.co |
|   Singapore   | AmityRegionalEndpoint.SG | api.sg.amity.co |
| United States | AmityRegionalEndpoint.US | api.us.amity.co |

## Authentication

You must first register the current device with a `userId`. A device registered with a `userId` will be permanently tied to that `userId` until you deliberately unregister the device, or until the device has been inactive for more than 90 days. A device registered with a specific `userId` will receive all messages belonging to that user.

{% embed url="<https://gist.github.com/amythee/f42082cd7a09b63990fedb15a69bb1bf>" %}


---

# 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.social.plus/social-plus-uikit/uikit-3/android/setup-and-authentication.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.
