# Automating export from Elastic Cloud

**URL:** https://discuss.elastic.co/t/automating-export-from-elastic-cloud/226045
**Category:** Kibana
**Created:** [April 1, 2020, 12:27pm UTC](https://discuss.elastic.co/t/automating-export-from-elastic-cloud/226045 "2020-04-01T12:27:11Z")
**Posts on this page:** 1
**Showing post:** 9

<div class="post-metadata">

### Author: ![t3fsx](https://avatars.discourse-cdn.com/v4/letter/t/bc79bd/32.png) [@t3fsx](https://discuss.elastic.co/u/t3fsx)
#### Post date: [April 3, 2020, 12:09am UTC](https://discuss.elastic.co/t/automating-export-from-elastic-cloud/226045/9 "2020-04-03T00:09:17Z")

</div>

Hey again @LizaD,

Thank you for your perseverance in this. 🤗

I had that before and eventually moved to what I posted on the post before the error. Basically, if you use what you mentioned, you'll get:

`{"statusCode":400,"error":"Bad Request","message":"Request must contain a kbn-xsrf header."}%``

That's what I'm using `-H "kbn-xsrf: script"` even though putting anything in front of `kbn-xsrf:` will get rid of that error. Saw that being recommended here: [Request must contain a kbn-xsrf header](https://discuss.elastic.co/t/request-must-contain-a-kbn-xsrf-header/96736)

---

_[View the full topic](https://discuss.elastic.co/t/automating-export-from-elastic-cloud/226045)._
