# Login to another api and store token

**URL:** <https://community.grafana.com/t/login-to-another-api-and-store-token/126035>\
**Category:** Grafana\
**Tags:** infinity-datasource, auth, plugins\
**Created:** [July 11, 2024, 5:36pm UTC](https://community.grafana.com/t/login-to-another-api-and-store-token/126035 "2024-07-11T17:36:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bjellesma1](https://avatars.discourse-cdn.com/v4/letter/b/94ad74/32.png) [@bjellesma1](https://community.grafana.com/u/bjellesma1)\
**Post date:** [July 11, 2024, 5:36pm UTC](https://community.grafana.com/t/login-to-another-api-and-store-token/126035/1 "2024-07-11T17:36:35Z")

</div>

Hello all, what I’m trying to do is to login to prompt the user to login to an external api. Once the user does that, the API will issue them a token. This token can them be use when making subsequent api calls from grafana panels using the infinity datasource plugin. Is it possible to prompt the user in this way and then store the token upon successful login?

Thanks!

---

<div class="post-metadata">

**Author:** ![yosiasz](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/yosiasz/32/45847_2.png) [@yosiasz](https://community.grafana.com/u/yosiasz)\
**Post date:** [July 11, 2024, 6:07pm UTC](https://community.grafana.com/t/login-to-another-api-and-store-token/126035/2 "2024-07-11T18:07:52Z")

</div>

it is in the roadmap so currently implemented

> **[Roadmap · grafana/grafana-infinity-datasource · Discussion #617](https://github.com/grafana/grafana-infinity-datasource/discussions/617)**
>
> Infinity data source plugin roadmap potential candidates for upcoming versions token refresh authentication prom/loki agent local time-shift Join results from multiple APIs Version 2.0.0 #601 #614 ...

---

<div class="post-metadata">

**Author:** ![bjellesma1](https://avatars.discourse-cdn.com/v4/letter/b/94ad74/32.png) [@bjellesma1](https://community.grafana.com/u/bjellesma1)\
**Post date:** [July 11, 2024, 7:00pm UTC](https://community.grafana.com/t/login-to-another-api-and-store-token/126035/3 "2024-07-11T19:00:26Z")

</div>

Sounds good! Do you know if it’s possible to reference a variable in a header when making an api call using infinity?

---

<div class="post-metadata">

**Author:** ![yosiasz](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/yosiasz/32/45847_2.png) [@yosiasz](https://community.grafana.com/u/yosiasz)\
**Post date:** [July 11, 2024, 7:22pm UTC](https://community.grafana.com/t/login-to-another-api-and-store-token/126035/4 "2024-07-11T19:22:56Z")

</div>

should be able to sort it out reading the doc

[https://grafana.github.io/grafana-infinity-datasource/docs/authentication](https://grafana.github.io/grafana-infinity-datasource/docs/authentication)

---

<div class="post-metadata">

**Author:** ![yosiasz](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/yosiasz/32/45847_2.png) [@yosiasz](https://community.grafana.com/u/yosiasz)\
**Post date:** [July 11, 2024, 9:37pm UTC](https://community.grafana.com/t/login-to-another-api-and-store-token/126035/5 "2024-07-11T21:37:59Z")

</div>


