# 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:** 9

<div class="post-metadata">

作者： ![cappslock](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cappslock/32/120789_2.png) [@cappslock](https://meta.discourse.org/u/cappslock)\
发布日期： [2016 年8 月 2 日 15:03 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/9 "2016-08-02T15:03:37Z")

</div>

Here’s an example curl command with sensitive data stripped out:

```plaintext
curl -X POST -H "Content-Type: application/x-www-form-urlencoded" -d 'raw=demo of failing post on behalf of non-existent api-user&title=herp derp jerp' "<my_discourse_instance>/posts?api_key=<valid_api_key>&api_username=<nonexistent_username>" -i

```

---

_[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)._
