App plugin using oauth tokens

hi!everyone.
I’m developing an app type plugin. I hope to use keycloak’s token when interacting with the backend, but I don’t know how to use it.It seems that only datasource plugin support this operation?

when interacting with the backend,

can you clarify what backend? Grafana backend or some external endpoint? How are you calling this endpoint?

Indeed, understanding the specific type of backend is crucial for addressing the issue. When I refer to “backend”, I am talking about a custom backend server, not the built-in backend of Grafana. I am developing an app type plugin and wish to use Keycloak’s token for authentication when interacting with this custom backend. Specifically, I communicate with my backend server using the getBackendSrv() method provided by Grafana. My current challenge is how to embed and utilize the Keycloak token in this interaction.

@luketing2001 you might have to write a small wrapper/proxy backend part for your plugin.

See this Add authentication for data source plugins | Grafana Plugin Tools

Thank you for providing a possible solution, I will try to implement it to resolve the issue!