# Label template for a link in a script field

**URL:** <https://discuss.elastic.co/t/label-template-for-a-link-in-a-script-field/282649>\
**Category:** Kibana\
**Created:** [August 27, 2021, 9:28am UTC](https://discuss.elastic.co/t/label-template-for-a-link-in-a-script-field/282649 "2021-08-27T09:28:11Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ippo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ippo/32/93183_2.png) [@ippo](https://discuss.elastic.co/u/ippo)\
**Post date:** [August 27, 2021, 9:28am UTC](https://discuss.elastic.co/t/label-template-for-a-link-in-a-script-field/282649/1 "2021-08-27T09:28:11Z")

</div>

Hello guys ,

Since i use multiple fields to create my url my script field return the value of the link . is there any way to put a in label template an emoji 😀 instead of just some text. ?

Also when i click on the link i need to write the login and password to access the file is it possible in a script field to configure thats so i dont need to write the login and password each time?

---

<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:** [August 30, 2021, 9:04pm UTC](https://discuss.elastic.co/t/label-template-for-a-link-in-a-script-field/282649/2 "2021-08-30T21:04:39Z")

</div>

> [@ippo](#):
>
> Since i use multiple fields to create my url my script field return the value of the link . is there any way to put a in label template an emoji 😀 instead of just some text. ?

Not sure what you mean here. Is it possible to share a screenshot that illustrates where you are having a problem with entering emojis?

> [@ippo](#):
>
> Also when i click on the link i need to write the login and password to access the file is it possible in a script field to configure thats so i dont need to write the login and password each time?

If we are talking Basic Authentication, the way to achieve that is to encode the user name and password and provide them in the _headers_ of the request. This means that it takes more than just putting something in the link. I'm not sure what kind of script field would help here.

There are two options you can consider:

- If no authentication is needed for you Kibana visitors, you can point them to a proxy that bypasses the actual host and adds, the authentication headers to the requests before sending them to the host, so your URLs link to a resource that automatically pre-authenticates every request.
- If the host allows an API key or auth token to be passed in the request path or query string, you could add the key or token in your URLs.

Adding the actual username and password to the URL would not be secure since it would show up in the logs, and anyone who's able to view the logs would have the power to impersonate that user. API keys and auth tokens are more secure because they can rotate often and have a built-in expiration time.

If you go with any of these suggestions, you should have security enabled in Kibana so that only authenticated users are able to view the links.

---

<div class="post-metadata">

**Author:** ![ippo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ippo/32/93183_2.png) [@ippo](https://discuss.elastic.co/u/ippo)\
**Post date:** [August 30, 2021, 10:50pm UTC](https://discuss.elastic.co/t/label-template-for-a-link-in-a-script-field/282649/3 "2021-08-30T22:50:08Z")

</div>

thanks a lot for your answer . i resoved the second point by adding the key to my url so i dont need to.  
About the 1st point basicallly i want to have a download image:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/1/1/11d60e0af56903da23d32ca68133e95c75fdffb8.png)

or an emoji instead of just some text in the label template is it possible  
heres a part of my script field:

 ![MicrosoftTeams-image (1)](https://us1.discourse-cdn.com/elastic/original/3X/5/4/54870384f7d5e49eb88983efe903f997776aec46.png)

---

<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:** [September 2, 2021, 5:34pm UTC](https://discuss.elastic.co/t/label-template-for-a-link-in-a-script-field/282649/4 "2021-09-02T17:34:36Z")

</div>

Have you tried just copy/pasting an emoji character in the URL template?

I'm not sure which emoji you want to use for this, but it looks like I was able to get it working with the broccoli emoji:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/3/d/3d9f6b33ed72d0a541cc1281d0068db08e626c3f.png)

---

<div class="post-metadata">

**Author:** ![ippo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ippo/32/93183_2.png) [@ippo](https://discuss.elastic.co/u/ippo)\
**Post date:** [September 2, 2021, 8:04pm UTC](https://discuss.elastic.co/t/label-template-for-a-link-in-a-script-field/282649/5 "2021-09-02T20:04:07Z")

</div>

thank you 👍

---

<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 30, 2021, 8:04pm UTC](https://discuss.elastic.co/t/label-template-for-a-link-in-a-script-field/282649/6 "2021-09-30T20:04:36Z")

</div>

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