> 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/java-sdk/room.md).

# Room

### Create Room

```java
public String createRoom(String name, String topic, List<String> invitations)
```

Parameters：

| Name        | Type         | Description                 | Required |
| ----------- | ------------ | --------------------------- | -------- |
| name        | string       | room name                   | true     |
| topic       | string       | room topic                  | false    |
| invitations | string array | array of user ids to invite | false    |

Returns:

| Name   | Type   | Description        | Required |
| ------ | ------ | ------------------ | -------- |
| roomId | string | id of the new room | true     |

### Invite User

```java
public void inviteUser(String roomId, String userId, String reason)
```

Parameters：

| Name   | Type   | Description   | Required |
| ------ | ------ | ------------- | -------- |
| roomId | string | room id       | true     |
| userId | string | user id       | true     |
| reason | string | invite reason | false    |

Returns: none

### Kick User

```java
public void kickUser(String roomId, String userId, String reason)
```

Parameters：

| Name   | Type   | Description   | Required |
| ------ | ------ | ------------- | -------- |
| roomId | string | room id       | true     |
| userId | string | user id       | true     |
| reason | string | invite reason | false    |

Returns: none

### Join Room

```java
public void joinRoom(String roomID)
```

Parameters：

| Name   | Type   | Description | Required |
| ------ | ------ | ----------- | -------- |
| roomId | string | room id     | true     |

Returns: none

### Leave Room

```java
public void leaveRoom(String roomID)
```

Parameters：

| Name   | Type   | Description | Required |
| ------ | ------ | ----------- | -------- |
| roomId | string | room id     | true     |

Returns: none

### Get Room Memebers

```java
public List<Member> getRoomMembers(String roomID)
```

Parameters：

| Name   | Type   | Description | Required |
| ------ | ------ | ----------- | -------- |
| roomId | string | room id     | true     |

Returns:

| Name                 | Type   | Description         | Required |
| -------------------- | ------ | ------------------- | -------- |
| Member.id            | string | member user id      | true     |
| Member.display\_name | string | member display name | true     |
| Member.avatar\_url   | string | member avatar url   | true     |
