---
title: "पहला API कॉल | Tajo"
description: "Brevo API पर अपना पहला API कॉल करें और अपने सेटअप की पुष्टि करें"
url: https://tajo.io/hi/docs/quick-start/first-api-call/
markdown: https://tajo.io/hi/docs/quick-start/first-api-call.md
lang: hi-IN
author: "Set Noa"
author_url: https://tajo.io/hi/set-noa/
robots: noindex
---

अर्ली एक्सेस का अनुरोध करें

अपना पहला नाम और कार्यस्थल का ईमेल पता दर्ज करें। Tajo एक्सेस अनुरोध की पुष्टि के लिए हम आपको एक लिंक ईमेल करेंगे।

# पहला API कॉल

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

आइए आपका पहला API कॉल करें ताकि यह पुष्टि हो सके कि आपका Brevo 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/hi/docs/authentication/) ठीक से
2. [एक SDK इंस्टॉल करें](https://tajo.io/hi/docs/sdks-libraries/) अपनी भाषा के लिए
3. [रेट लिमिट के बारे में जानें](https://tajo.io/hi/docs/rate-limits/)
4. [ईमेल एंडपॉइंट एक्सप्लोर करें](https://tajo.io/hi/docs/email-messaging/)
