# Passing an api\_username for a user that does not exist returns a 500 with no useful context

**URL:** <https://meta.discourse.org/t/passing-an-api-username-for-a-user-that-does-not-exist-returns-a-500-with-no-useful-context/46407>\
**Category:** Development\
**Created:** [2016 年6 月 24 日 16:06 UTC](https://meta.discourse.org/t/passing-an-api-username-for-a-user-that-does-not-exist-returns-a-500-with-no-useful-context/46407 "2016-06-24T16:06:12Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

作者： ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)\
发布日期： [2016 年8 月 2 日 18:51 UTC](https://meta.discourse.org/t/passing-an-api-username-for-a-user-that-does-not-exist-returns-a-500-with-no-useful-context/46407/10 "2016-08-02T18:51:59Z")

</div>

Try making cURL request in this format:

```plaintext
curl -X POST -H "Accept: application/json" -H "Content-Type: application/json" -d '{"raw":"demo of success post"}' <my_discourse_instance>/posts?api_key=<valid_api_key>&api_username=<nonexistent_username>

```

You will get exact response and error message you are looking for.

---

_[View the full topic](https://meta.discourse.org/t/passing-an-api-username-for-a-user-that-does-not-exist-returns-a-500-with-no-useful-context/46407)._
