# Postman으로 Discourse API 사용하기 시작하기

**URL:** https://meta.discourse.org/t/getting-started-using-postman-with-the-discourse-api/333669
**Category:** Developers
**Created:** [10월 30, 2024, 5:49오후 UTC](https://meta.discourse.org/t/getting-started-using-postman-with-the-discourse-api/333669 "2024-10-30T17:49:40Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [10월 30, 2024, 5:49오후 UTC](https://meta.discourse.org/t/getting-started-using-postman-with-the-discourse-api/333669/1 "2024-10-30T17:49:40Z")

</div>

# 요약

[Postman](https://www.postman.com/downloads/)은 API에 대한 요청을 쉽게 구성하고 테스트할 수 있는 도구입니다.

## Discourse와의 설정

1. Postman을 연 후 워크스페이스 만들기(Create Workspace)를 클릭하세요:

2. `빈 워크스페이스(Blank workspace)`를 선택하고 다음(Next)을 클릭하세요.

3. 제목을 `Discourse API`로 지정하고 만들기(Create)를 선택하세요:

4. `컬렉션(Collections)`을 클릭하세요:  

5. 가져오기(Import)를 클릭하세요:  

6. `https://docs.discourse.org/openapi.json` (docs.discourse.org에 표시된 “다운로드” URL)를 붙여넣으세요:  

7. `Postman Collection`으로 가져오도록 선택하세요:  

## 새 환경(Environment) 생성

1. `환경(Environments)`과 `환경 만들기(Create Environment)`를 클릭하세요. 이는 테스트 중인 인스턴스에 _특정_된 변수를 저장하는 곳입니다. 이 예제에서는 `try.discourse.org`를 사용합니다.

## Hello World!

요청을 시도해 보겠습니다!

1. `컬렉션(Collections)` → `categories.json` → `카테고리 목록 가져오기(Retrieves a list of categories)`를 선택하고 보내기(Send)를 클릭하세요. 결과를 확인해야 합니다:  
 ![이 이미지는 API를 검색하고 작업하는 기능을 보여주는 Postman API 소프트웨어가 작동하는 스크린샷을 보여줍니다. (AI 캡션)](https://global.discourse-cdn.com/meta/original/4X/9/0/2/9021ab0c1bee778daae754ec03d230e146a4fbba.png)

## 요청에 인증 추가

API 키 인증으로 API를 사용하려면:

1. 이 환경 또는 새 환경에 다음 변수를 추가하세요:

2. 컬렉션에 스크립트를 추가하세요  
`컬렉션(Collections)` → `Discourse API Documentation` → `스크립트(Scripts)` → `사전 요청(Pre-request)`을 선택하고 다음을 붙여넣으세요:
