Creating a panel plugin that can use SecurejsonData and oauth data

I’m fairly new to Grafana plugin development, so I’m just looking for some guidance here.

My end goal is to create a panel with a button on it. When the button is pressed, a REST call will be made that is proxied through the Grafana server where an API key can be added to the request. It looks like this is only possible with a data source, but I’d like to do this with just a panel.

That’s not completely it, though. I’d also like a way to add the username of the person making the request to the REST call. The point of this would be so that the program that handles the REST call would see there’s a valid API key, but could then decide if the user has permission to execute the given request. This is especially important because I do not want to allow users that are not logged in to be able to make this request. It’s important that this data isn’t added in the front end, as it could easily be spoofed.

Ideally I wouldn’t have to make a data source plugin at all for what I’m trying to accomplish, but it doesn’t look like I get the same features as a data source if I’m just trying to make a panel.

My fallback option would be to make this dashboard private and just have the API key passed to the front end, but I’d like to avoid making the dashboard private.