# Configuring ttn http integration forward to elastic cloud without success

**URL:** <https://www.thethingsnetwork.org/forum/t/configuring-ttn-http-integration-forward-to-elastic-cloud-without-success/11166>\
**Category:** Uncategorized\
**Created:** [December 15, 2017, 12:28am UTC](https://www.thethingsnetwork.org/forum/t/configuring-ttn-http-integration-forward-to-elastic-cloud-without-success/11166 "2017-12-15T00:28:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![pizNair](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/piznair/32/35697_2.png) [@pizNair](https://www.thethingsnetwork.org/forum/u/pizNair)\
**Post date:** [December 15, 2017, 12:28am UTC](https://www.thethingsnetwork.org/forum/t/configuring-ttn-http-integration-forward-to-elastic-cloud-without-success/11166/1 "2017-12-15T00:28:10Z")

</div>

I’m about to forward my sensor data to elastic cloud 5.x. for test i did a curl which worked - only using GET  
curl -u user:password https://…myelastic1.cloud.es.io:9243/myid/mytype -XPOST -d ‘{“msg”:“test”}’  
this worked successfully  
in the http integration i did the following

- url: https://…myelastic1.cloud.es.io:9243
- method:GET
- authorization: Authorization: Basic abcdef
- custom header name: Content-Type
- custom header value: application/json

what else do I miss?

---

<div class="post-metadata">

**Author:** ![arjanvanb](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/arjanvanb/32/46626_2.png) [@arjanvanb](https://www.thethingsnetwork.org/forum/u/arjanvanb)\
**Post date:** [December 15, 2017, 9:09am UTC](https://www.thethingsnetwork.org/forum/t/configuring-ttn-http-integration-forward-to-elastic-cloud-without-success/11166/2 "2017-12-15T09:09:54Z")

</div>

> [@pizNair](#):
>
> Authorization: Basic abcdef

That’s not a valid value for Basic. See also [https://www.thethingsnetwork.org/forum/t/http-integration/5271/28](https://www.thethingsnetwork.org/forum/t/http-integration/5271/28)

> [@pizNair](#):
>
> custom header name: Content-Type

I doubt that’s supported; a GET does not have a request Content Type. I’d use POST like you did with curl. And I’d test with [https://requestb.in](https://requestb.in) to see what you get.

---

<div class="post-metadata">

**Author:** ![lukGWF](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/lukgwf/32/35697_2.png) [@lukGWF](https://www.thethingsnetwork.org/forum/u/lukGWF)\
**Post date:** [December 15, 2017, 1:27pm UTC](https://www.thethingsnetwork.org/forum/t/configuring-ttn-http-integration-forward-to-elastic-cloud-without-success/11166/3 "2017-12-15T13:27:02Z")

</div>

> [@arjanvanb](#):
>
> That’s not a valid value for Basic.

Well, abcdef was confusing.  
what I did:  
Authorization: Basic QWxhZGRpbjpPcGVuU2VzYW1l  
the authorization string is structured according to the following rules:  
'Authorization: Basic '+Buffer.from(‘elastic’ + ‘:’ + ‘passwordFromElastic’).toString(‘base64’)  
and I tried GET and POST

---

<div class="post-metadata">

**Author:** ![arjanvanb](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/arjanvanb/32/46626_2.png) [@arjanvanb](https://www.thethingsnetwork.org/forum/u/arjanvanb)\
**Post date:** [December 15, 2017, 2:20pm UTC](https://www.thethingsnetwork.org/forum/t/configuring-ttn-http-integration-forward-to-elastic-cloud-without-success/11166/4 "2017-12-15T14:20:52Z")

</div>

So:

- Configure the integration to use [https://requestb.in](https://requestb.in) to capture the headers and JSON payload
- Make sure that looks good (and does not include duplicate haders; looking at you, `Content-Type`)
- Use those headers and JSON to test with curl towards Elastic Cloud

---

<div class="post-metadata">

**Author:** ![lukGWF](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/lukgwf/32/35697_2.png) [@lukGWF](https://www.thethingsnetwork.org/forum/u/lukGWF)\
**Post date:** [December 19, 2017, 9:50am UTC](https://www.thethingsnetwork.org/forum/t/configuring-ttn-http-integration-forward-to-elastic-cloud-without-success/11166/6 "2017-12-19T09:50:29Z")

</div>

tested it using chrome/postman - which worked  
here a snapshot of the configuration ![grafik](https://www.thethingsnetwork.org/forum/uploads/default/original/2X/f/f62aacd4d82fb1847489c4fa7b7e1c104c158be8.png)  
I guess it is where to put the type and id. for that I’ve already checked out adding it to “POST /type/id” and also as in the picture at the end of the url.

**checked again** with the following syntax structure  
url:port/type/id  
(copied authentication string from chrome/postman)  
(copied custom header:Content-Type and value:application/json)  
it’s still not working - but as mentioned already it worked using chrome/postman. For me it seems like the TTN request isn’t merged properly or the port firewall settings of the TTN block the request on the port 9243.

furthermore I tried the URL like [elastic.co:9243](http://elastic.co:9243) and then added the type and id to the POST command like this:  
POST /test\_201712\_201801/abc  
and also with this (postman cutout)  
POST /test\_201712\_201801/abc HTTP/1.1
