> ## Documentation Index
> Fetch the complete documentation index at: https://www.ayrshare.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# 400 Bad Request Error को कैसे ठीक करें

> जानें कि Ayrshare API Bad Request (400) error क्यों लौटाता है, गुम या अमान्य पैरामीटर्स को कैसे पहचानें, और अपनी request को कैसे ठीक करें और पुनः भेजें।

यदि आपको JSON के बजाय "Bad Request" का HTML response मिलता है, तो यह संभव है कि POST body पैरामीटर मान्य JSON नहीं है।

उदाहरण के लिए, यदि आप यह अमान्य JSON भेजते हैं:

```javascript theme={"system"}
{
    "post": "A "great" post"
    "platforms: ["twitter"]
}
```

तो "Bad Request" का response लौटाया जाएगा। ऊपर दिए गए code में तीन समस्याएँ हैं: `post` पर एक गुम comma, पोस्ट टेक्स्ट में escape किए बिना " quotes का दोहरा सेट है, और `platform` पर एक गुम अंत quote। मान्य JSON यह होना चाहिए:

```javascript theme={"system"}
{
    "post": "A \"great\" post",
    "platforms": ["twitter"]
}
```

आप अपने JSON को मान्य करने के लिए निम्नलिखित URL पर POST करके अपने JSON का परीक्षण कर सकते हैं। सुनिश्चित करें कि Content-Type को `text/plain` पर सेट करें।

हम [Postman](https://www.ayrshare.com/docs/testing/postman.md) में कॉल आज़माने की अनुशंसा करते हैं, जो JSON स्वरूपण को ठीक करने में मदद कर सकता है। अधिक जानकारी के लिए कृपया अगला अनुभाग देखें।

## JSON मान्य करें

आप अपने JSON को किसी ऑनलाइन linter, जैसे [https://jsonlint.com/](https://jsonlint.com/) का उपयोग करके या [Postman](https://www.ayrshare.com/docs/testing/postman.md) का उपयोग करके मान्य कर सकते हैं।

आप हमारे `/validate/json` endpoint का भी उपयोग कर सकते हैं:

> **[validate](https://www.ayrshare.com/docs/apis/validate/overview.md)**


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.