# Token input in Logstash

**URL:** <https://discuss.elastic.co/t/token-input-in-logstash/282460>\
**Category:** Logstash\
**Created:** [August 25, 2021, 8:10am UTC](https://discuss.elastic.co/t/token-input-in-logstash/282460 "2021-08-25T08:10:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sama.sowjanya](https://avatars.discourse-cdn.com/v4/letter/s/c2a13f/32.png) [@sama.sowjanya](https://discuss.elastic.co/u/sama.sowjanya)\
**Post date:** [August 25, 2021, 8:10am UTC](https://discuss.elastic.co/t/token-input-in-logstash/282460/1 "2021-08-25T08:10:42Z")

</div>

We have an API from Genesys to integrate with Elasticsearch through logstash, but the authorization to that api is token system. Is there a way to fetch the token in Logstash.  
What would be the best approach to integrate GENESYS with ELK.

Any suggestions please.

---

<div class="post-metadata">

**Author:** ![AquaX](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aquax/32/92006_2.png) [@AquaX](https://discuss.elastic.co/u/AquaX)\
**Post date:** [August 25, 2021, 2:22pm UTC](https://discuss.elastic.co/t/token-input-in-logstash/282460/2 "2021-08-25T14:22:05Z")

</div>

If you are using the http\_poller input then it likely won't work.  
What you can do is generate a generic event using the [generator](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-generator.html) plugin on a set schedule.  
Then use a combination of the [ruby](https://www.elastic.co/guide/en/logstash/current/plugins-filters-ruby.html) plugin (if needed) and [http](https://www.elastic.co/guide/en/logstash/current/plugins-filters-http.html) plugins in the filter section to generate the api token and save it in a field and then a second http to use that generated token (that you saved in a field) to run the query you would like.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 22, 2021, 2:22pm UTC](https://discuss.elastic.co/t/token-input-in-logstash/282460/3 "2021-09-22T14:22:33Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
