grafana_mail icon indicating copy to clipboard operation
grafana_mail copied to clipboard

api_key doesn't work

Open satyen4you opened this issue 6 years ago • 1 comments

Hi

  1. I am trying to use your python script to email grafana screenshot report. For some reason api_key generated by grafana doesn't work. I always get http status 401 api_key invalid. not sure if this issue with the grafana itself.

  2. Alternatively I tried to use basic authentication by modifying below line


r = requests.get(url, headers={"Authorization": "Basic " + api_token}, stream=True, verify=False).

But I always get http 404 page not found. I tried to print the request and it shows like below:

"https://<host_name>:3000/render/dashboard/db/apigee-cloud?from=1524700800000&to=1524787199000&width=1700&height=500"

When I try above request in browser it works fine and render's the image. However it gives 404 not found from the script.

satyen4you avatar Apr 30 '18 15:04 satyen4you

Can you provide the full command (with all parameters) that you are using to generate the PNG?

pdott1 avatar May 10 '18 23:05 pdott1