> For the complete documentation index, see [llms.txt](https://docs.mimiland.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mimiland.com/mimiland-core-services/social-and-friends/api-references/block-friend.md).

# Block Friend

Block friend will include Block or Unblock, view Block Friends List

### Common Parameters <a href="#utilizing-common-parameters" id="utilizing-common-parameters"></a>

| Key      | Type   | Description    |
| -------- | ------ | -------------- |
| friendId | String | id of the user |

## Block Friend

Request

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

```http
POST /v1/friends/block HTTP/1.1
Host: friend-dev.api.mimiland.io
mm-client-id: mml
Content-Type: application/json
Authorization: bearer v4.public.eyJhZC*****5xTtpdbQI
mm-user-id: 6552e9dd1f835ac7ca4ba3ec
Content-Length: 46

{
    "friendId": "653263627f60e4b804d97d04"
}
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const myHeaders = new Headers();
myHeaders.append("mm-client-id", "mml");
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Authorization", "bearer v4.public.eyJhZC*****5xTtpdbQI");
myHeaders.append("mm-user-id", "6552e9dd1f835ac7ca4ba3ec");

const raw = JSON.stringify({
  "friendId": "653263627f60e4b804d97d04"
});

const requestOptions = {
  method: "POST",
  headers: myHeaders,
  body: raw,
  redirect: "follow"
};

fetch("https://friend-dev.api.mimiland.io/v1/friends/block", requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.error(error));
```

{% endtab %}
{% endtabs %}

## List Block Friend

Request

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

```http
GET /v1/friends/block/100/0 HTTP/1.1
Host: friend-dev.api.mimiland.io
mm-client-id: mml
Content-Type: application/json
Authorization: bearer v4.public.eyJhZC*****5xTtpdbQI
mm-user-id: 6552e9dd1f835ac7ca4ba3ec
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const myHeaders = new Headers();
myHeaders.append("mm-client-id", "mml");
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Authorization", "bearer v4.public.eyJhZC*****5xTtpdbQI");
myHeaders.append("mm-user-id", "6552e9dd1f835ac7ca4ba3ec");

const requestOptions = {
  method: "GET",
  headers: myHeaders,
  redirect: "follow"
};

fetch("https://friend-dev.api.mimiland.io/v1/friends/block/100/0", requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.error(error));
```

{% endtab %}
{% endtabs %}

## List Block Me

Request

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

```http
GET /v1/friends/block/me/100/0 HTTP/1.1
Host: friend-dev.api.mimiland.io
mm-client-id: mml
Content-Type: application/json
Authorization: bearer v4.public.eyJhZC*****5xTtpdbQI
mm-user-id: 653263627f60e4b804d97d04
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const myHeaders = new Headers();
myHeaders.append("mm-client-id", "mml");
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Authorization", "bearer v4.public.eyJhZC*****5xTtpdbQI");
myHeaders.append("mm-user-id", "653263627f60e4b804d97d04");

const raw = "";

const requestOptions = {
  method: "GET",
  headers: myHeaders,
  body: raw,
  redirect: "follow"
};

fetch("https://friend-dev.api.mimiland.io/v1/friends/block/me/100/0", requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.error(error));
```

{% endtab %}
{% endtabs %}

## Unblock Friends

Request

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

```http
POST /v1/friends/unblock HTTP/1.1
Host: friend-dev.api.mimiland.io
mm-client-id: mml
Content-Type: application/json
Authorization: bearer v4.public.eyJhZC*****5xTtpdbQI
mm-user-id: 653263627f60e4b804d97d04
Content-Length: 46

{
    "friendId": "650ad4aa7f60e4b804d96bda"
}
```

{% endtab %}

{% tab title="JavaScript" %}

```java
const myHeaders = new Headers();
myHeaders.append("mm-client-id", "mml");
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Authorization", "bearer v4.public.eyJhZC*****5xTtpdbQI");
myHeaders.append("mm-user-id", "653263627f60e4b804d97d04");

const raw = JSON.stringify({
  "friendId": "650ad4aa7f60e4b804d96bda"
});

const requestOptions = {
  method: "POST",
  headers: myHeaders,
  body: raw,
  redirect: "follow"
};

fetch("https://friend-dev.api.mimiland.io/v1/friends/unblock", requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.error(error));
```

{% endtab %}
{% endtabs %}
