---
updatedAt: 2025-03-19T23:24:43.000Z
agentTools:
  projectIndex: https://sdk.sendon.io/llms.txt
---

# [SDK] 수신거부 조회

```java Java
package com.sendon.example.contacts;

import com.sendon.ApiException;
import com.sendon.example.BaseScenario;
import com.sendon.model.GetBlocklistResponseDto;

public class ContactsGetBlocklist {
  protected final Sendon SENDON = Sendon.getInstance("SENDON_ID", "SENDON_APIKEY");
  
  public void execute() throws InterruptedException {
    try {
      GetBlocklistResponseDto response = SENDON.getContacts().getBlocklist(null, null);
      System.out.println("Response\n\t" + response.toJson());
      
    } catch (ApiException e) {
      handleException(e);
    }
  }

  public String getDescription() {
    return "[주소록] 차단목록 조회";
  }
  
  
}

```

```javascript JavaScript
import { GetBlocklistResponseDto } from '@alipeople/sendon-sdk-typescript'

export class GetBlocklist {
  description = '[주소록] 차단목록 조회'
  
	const sendon = new Sendon({
    id: 'SENDON_ID',
    apikey: 'SENDON_APIKEY',
    debug: false,
  })

  async execute() {
    const result: GetBlocklistResponseDto = await this.sendon.contacts.getBlocklist({
      cursor: 3,
      limit: 3,
    })
    console.log(`result: ${JSON.stringify(result, null, 2)}`)
  }
}
```

```json Response Example
result: {
  "code": 200,
  "message": "OK",
  "data": {
    "blocklist": [
      {
        "userId": 164,
        "channelId": 0,
        "phoneNumber": "01900009001",
        "blockId": 84,
        "blockType": "API",
        "blockDomain": "dev-api.sendon.io",
        "createdAt": "2024-11-21T00:43:04.000Z",
        "updatedAt": "2024-11-21T00:43:04.000Z"
      },
      {
        "userId": 164,
        "channelId": 0,
        "phoneNumber": "01900009002",
        "blockId": 86,
        "blockType": "API",
        "blockDomain": "dev-api.sendon.io",
        "createdAt": "2024-11-21T01:14:11.000Z",
        "updatedAt": "2024-11-21T01:14:11.000Z"
      }
    ],
    "cursor": null,
    "totalCount": 5
  }
}
```

# SDK 초기화

<!-- java@8 -->
<!-- javascript@6-10 -->

센드온 계정과 발급받은 APIKey를 이용해 초기화합니다.

# 수신거부 목록 조회

<!-- java@12-13 -->
<!-- javascript@13-17 -->

등록된 수신거부 목록을 조회합니다.