# JSON vs URL Encoded API Calls - JSON returns BAD CSRF

**URL:** <https://meta.discourse.org/t/json-vs-url-encoded-api-calls-json-returns-bad-csrf/22406>\
**Category:** Feature\
**Created:** [22 Novembro , 2014 02:20 UTC](https://meta.discourse.org/t/json-vs-url-encoded-api-calls-json-returns-bad-csrf/22406 "2014-11-22T02:20:09Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![sperok](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sperok/32/114977_2.png) [@sperok](https://meta.discourse.org/u/sperok)\
**Post date:** [22 Novembro , 2014 20:44 UTC](https://meta.discourse.org/t/json-vs-url-encoded-api-calls-json-returns-bad-csrf/22406/6 "2014-11-22T20:44:14Z")

</div>

No change with skip\_validations: true added to the JSON and category properly coded as an integer. And I would have thunk that behavior would be consistent for JSON or form-encoded. Now this is a mission …

```
POST /posts HTTP/1.1
Content-Type: application/json

{ "api_key":"8d3ca248f3e30e5985a11344568b4ec52a599533f46878bea96f5c5d868abd4f", "api_username":"spero", "raw":"http://www.youtube.com/watch?v=05zrCwLDkVQ", "title":"What's Good About Compassion", "skip_validations": true, "is_warning":false, "category":33, "archetype":"regular" }

```

---

_[View the full topic](https://meta.discourse.org/t/json-vs-url-encoded-api-calls-json-returns-bad-csrf/22406)._
