---
title: "첫 API 호출 | Tajo"
description: "Brevo API로 첫 API 호출을 실행하고 설정이 올바른지 확인합니다"
url: https://tajo.io/kr/docs/quick-start/first-api-call/
markdown: https://tajo.io/kr/docs/quick-start/first-api-call.md
lang: ko-KR
author: "Set Noa"
author_url: https://tajo.io/kr/set-noa/
robots: noindex
---

Tajo 사전 이용 신청

이름과 회사 이메일 주소를 입력하세요. Tajo 이용 신청을 확인할 수 있는 링크를 이메일로 보내드립니다.

# 첫 API 호출

[Set Noa](https://tajo.io/kr/set-noa/)

Brevo API 설정이 올바르게 동작하는지 확인하기 위해 첫 API 호출을 실행해 보겠습니다.

## 사전 준비 사항

- Brevo 계정
- 대시보드에서 발급받은 API 키
- HTTP 요청을 보낼 수 있는 도구 (curl, Postman 등)

## 계정 정보 가져오기

가장 간단한 첫 호출은 계정 정보를 가져오는 것입니다.

### cURL 사용

```bash
curl -X GET "https://api.brevo.com/v3/account" \
  -H "Accept: application/json" \
  -H "api-key: YOUR_API_KEY"
```

### JavaScript (Node.js) 사용

```javascript
const fetch = require('node-fetch');

const getAccount = async () => {
  try {
    const response = await fetch('https://api.brevo.com/v3/account', {
      method: 'GET',
      headers: {
        'Accept': 'application/json',
        'api-key': 'YOUR_API_KEY'
      }
    });

    const data = await response.json();
    console.log('Account Info:', data);
  } catch (error) {
    console.error('Error:', error);
  }
};

getAccount();
```

### Python 사용

```python
import requests

url = "https://api.brevo.com/v3/account"
headers = {
    "Accept": "application/json",
    "api-key": "YOUR_API_KEY"
}

response = requests.get(url, headers=headers)
print(response.json())
```

### PHP 사용

```php
<?php
$url = 'https://api.brevo.com/v3/account';
$headers = [
    'Accept: application/json',
    'api-key: YOUR_API_KEY'
];

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$response = curl_exec($ch);
curl_close($ch);

echo $response;
?>
```

## 예상 응답

호출에 성공하면 다음과 같은 응답을 받습니다.

```json
{
  "email": "your-email@company.com",
  "firstName": "John",
  "lastName": "Doe",
  "companyName": "Your Company",
  "address": {
    "street": "123 Main Street",
    "city": "New York",
    "zipCode": "10001",
    "country": "United States"
  },
  "plan": [
    {
      "type": "payAsYouGo",
      "credits": 10000,
      "creditsUsed": 1500
    }
  ]
}
```

## 오류 처리

오류가 발생하면 다음과 같은 일반적인 원인을 확인하십시오.

### 잘못된 API 키 (401 Unauthorized)

```json
{
  "code": "unauthorized",
  "message": "Invalid API key provided"
}
```

**해결 방법**: API 키가 정확한지, 필요한 권한을 갖추고 있는지 확인합니다.

### 요청 한도 초과 (429 Too Many Requests)

```json
{
  "code": "too_many_requests",
  "message": "Rate limit exceeded"
}
```

**해결 방법**: 잠시 기다린 후 다시 요청하거나 요금제를 상향합니다.

### 서버 오류 (500 Internal Server Error)

```json
{
  "code": "internal_error",
  "message": "An internal error occurred"
}
```

**해결 방법**: [상태 페이지](https://status.brevo.com/)를 확인하거나 지원팀에 문의합니다.

## 다음 단계

첫 API 호출에 성공했다면 다음을 진행합니다.

1. [인증 설정하기](https://tajo.io/kr/docs/authentication/)
2. 사용하는 언어에 맞는 [SDK 설치하기](https://tajo.io/kr/docs/sdks-libraries/)
3. [요청 한도 알아보기](https://tajo.io/kr/docs/rate-limits/)
4. [이메일 엔드포인트 살펴보기](https://tajo.io/kr/docs/email-messaging/)
