> For the complete documentation index, see [llms.txt](https://sending-network.gitbook.io/sending.network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sending-network.gitbook.io/sending.network/sdk-documentation/android-client-sdk/user.md).

# User

## ProfileService API

Get the ProfileService object via a login session.

```kotlin
val profileService = session.profileService()
```

### **Set user nickname**

Updates the user's display name.

```kotlin
suspend fun setDisplayName(userId: String, newDisplayName: String)
```

**Input parameters:**

| Name           | Type   | Description      | Required |
| -------------- | ------ | ---------------- | -------- |
| userId         | String | User ID          | true     |
| newDisplayName | String | New display name | true     |

### **Set user avatar**

Updates the user's profile picture.

```kotlin
suspend fun updateAvatar(userId: String, newAvatarUri: Uri, fileName: String)
```

**Input parameter:**

| Name         | Type   | Description                 | Required |
| ------------ | ------ | --------------------------- | -------- |
| userId       | String | User ID                     | true     |
| newAvatarUri | String | New avatar uri              | true     |
| fileName     | String | Name of selected image file | true     |

### **Set user profile description**

Sets a self-introduction for the user's profile.

```kotlin
suspend fun setProfileBio(userId: String, bio: String)
```

**Input parameter:**

| Name   | Type   | Description         | Required |
| ------ | ------ | ------------------- | -------- |
| userId | string | User ID             | true     |
| bio    | string | Profile description | true     |

**Output parameter:** None

### **Retrieve user profile**

Get a user's profile data

```kotlin
suspend fun getProfile(userId: String): JsonDict
```

**Input parameter:**

| Name   | Type   | Description | Required |
| ------ | ------ | ----------- | -------- |
| userId | string | User ID     | true     |

**Output parameter:**

| Type     | Description                 | Required |
| -------- | --------------------------- | -------- |
| JsonDict | User profile key-value data | true     |

**JsonDict fields：**

| Name            | Type   | Description                    | Required |
| --------------- | ------ | ------------------------------ | -------- |
| displayname     | string | User nickname                  | true     |
| avatar\_url     | string | User profile image             | true     |
| bio             | string | User profile self-introduction | true     |
| wallet\_address | string | User wallet address            | true     |

***

## AccountDataService API

Get the AccountDataService object through a login session

```kotlin
val accountDataService = session.accountDataService()
```

### **Set user account data**

Sets custom data related to the user. `content` contains the complete data for the specified type.

```kotlin
suspend fun updateUserAccountData(type: String, content: Content)
```

**Input parameter:**

| Name    | Type    | Description                | Required |
| ------- | ------- | -------------------------- | -------- |
| type    | string  | Customized data type       | true     |
| content | Content | Content in key-value pairs | true     |

**Output parameter:** None

### **Retrieve user account data**

```kotlin
fun getUserAccountDataEvent(type: String): UserAccountDataEvent?
```

**Input parameter:**

| Name | Type   | Description                    | Required |
| ---- | ------ | ------------------------------ | -------- |
| type | string | Type of data you wish to query | true     |

**Output parameter:** `UserAccountDataEvent`

| Name    | Type    | Description     | Required |
| ------- | ------- | --------------- | -------- |
| type    | string  | Data type       | true     |
| content | Content | Key/value pairs | true     |

***

## UserService API

Get the UserService object via a login session.

<pre class="language-kotlin"><code class="lang-kotlin"><strong>val userService = session.userService()
</strong></code></pre>

### **Get the contact list**

Retrieve the list of your contacts.

```kotlin
suspend fun getContacts(): List<ContactInfo>
```

**Input parameters:** None

**Output parameter:**

<table><thead><tr><th width="151">Type</th><th width="313">Description</th><th>Required</th></tr></thead><tbody><tr><td>List</td><td>List of contact's information</td><td>true</td></tr></tbody></table>

`ContactInfo` details：

<table><thead><tr><th width="152">Name</th><th>Type</th><th width="197">Description</th><th>Required</th></tr></thead><tbody><tr><td>contactId</td><td>String</td><td>Contact ID</td><td>true</td></tr><tr><td>displayName</td><td>String</td><td>Contact name</td><td>false</td></tr><tr><td>avatarUrl</td><td>String</td><td>URL to the contact's avatar image</td><td>false</td></tr><tr><td>walletAddress</td><td>String</td><td>Contact's wallet address</td><td>false</td></tr><tr><td>tags</td><td>String array</td><td>Array of tags associated with the contact</td><td>false</td></tr></tbody></table>

### **Add a contact**

Add a user to your contact list.

```kotlin
suspend fun addContact(contactId: String, tags: List<String> = listOf())
```

**Input parameters:**

<table><thead><tr><th width="129">Name</th><th width="124">Type</th><th width="177">Description</th><th>Required</th></tr></thead><tbody><tr><td>contactId</td><td>String</td><td>Contact ID</td><td>true</td></tr><tr><td>tags</td><td>String array</td><td>Array of tags associated with the contact</td><td>false</td></tr></tbody></table>

**Output parameter:** None

### **Delete a contact**

Remove a user from your contact list.

```kotlin
suspend fun removeContact(contactId: String)
```

**Input parameters:**

| Name      | Type   | Description | Required |
| --------- | ------ | ----------- | -------- |
| contactId | String | Contact ID  | true     |

**Output parameter:** None


---

# 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://sending-network.gitbook.io/sending.network/sdk-documentation/android-client-sdk/user.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.
