# Communication between the plugins

**URL:** <https://discuss.elastic.co/t/communication-between-the-plugins/220369>\
**Category:** Kibana\
**Created:** [February 21, 2020, 1:14pm UTC](https://discuss.elastic.co/t/communication-between-the-plugins/220369 "2020-02-21T13:14:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![vvvprabhakar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vvvprabhakar/32/53806_2.png) [@vvvprabhakar](https://discuss.elastic.co/u/vvvprabhakar)\
**Post date:** [February 21, 2020, 1:14pm UTC](https://discuss.elastic.co/t/communication-between-the-plugins/220369/1 "2020-02-21T13:14:19Z")

</div>

Kibana version 6.1

we have default core plugin 'elasticsearch'  
I wrote my own plugin 'project-auth' here I have a userId which I encrypted it and set to cookie

In every request of my elasticsearch I want this userId to be passed, I have "callwithInternalUser" method I can add a parameter there

````auto
    clientParams = { ...clientParams, 'userId': '1234567890' };
    return callAPI(this._client, endpoint, clientParams, options);
  }```

Now my problem is, I have userId inside the 'project-auth' plugin, I want it inside elasticsearch plugin 
what to do ??
or tell me how to pass the data from there to here.
````

---

<div class="post-metadata">

**Author:** ![vvvprabhakar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vvvprabhakar/32/53806_2.png) [@vvvprabhakar](https://discuss.elastic.co/u/vvvprabhakar)\
**Post date:** [February 21, 2020, 1:15pm UTC](https://discuss.elastic.co/t/communication-between-the-plugins/220369/2 "2020-02-21T13:15:24Z")

</div>

@matw

---

<div class="post-metadata">

**Author:** ![vvvprabhakar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vvvprabhakar/32/53806_2.png) [@vvvprabhakar](https://discuss.elastic.co/u/vvvprabhakar)\
**Post date:** [February 21, 2020, 1:16pm UTC](https://discuss.elastic.co/t/communication-between-the-plugins/220369/3 "2020-02-21T13:16:06Z")

</div>

@lukas

---

<div class="post-metadata">

**Author:** ![tsullivan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tsullivan/32/31077_2.png) [@tsullivan](https://discuss.elastic.co/u/tsullivan)\
**Post date:** [February 24, 2020, 6:41pm UTC](https://discuss.elastic.co/t/communication-between-the-plugins/220369/4 "2020-02-24T18:41:54Z")

</div>

What does Elasticsearch need to do with this value? The elasticsearch plugin doesn't know anything about your plugin, so you might need to find a different way to transmit the value. I probably wouldn't try to leverage on `callWithInternalUser` as that is vendor code and you don't want it to break by giving it something new to be concerned about.

Is there any other way to create data with the userId so it can correlated to whatever else is needed?

---

<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:** [March 23, 2020, 6:42pm UTC](https://discuss.elastic.co/t/communication-between-the-plugins/220369/5 "2020-03-23T18:42:08Z")

</div>

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