grafana-dash-gen icon indicating copy to clipboard operation
grafana-dash-gen copied to clipboard

Unable to publish dashboard TEST API dashboard { message: 'Unauthorized' } Got statusCode401

Open ondrejFuchs opened this issue 6 years ago • 3 comments

Hi, I try to connect to grafana running in docker and I don't know how to set up grafana.configure({ url: 'http://localhost:3000/api/dashboards/db/', cookie: 'auth-openid=REPLACETOKENIFAPPLICABLE' });

I usually use API TOKEN in form: Authorization: Bearer "My-token", but how to configure "cookie"? For any reaction I will be grateful.

ondrejFuchs avatar Apr 30 '18 12:04 ondrejFuchs

cookie could be find in chrome debugger,which name is grafana_session

evoup avatar Aug 19 '19 09:08 evoup

I'm curious about the choice to use cookie as an authentication method when Grafana has API key support.

memyselfandm avatar Jul 28 '20 23:07 memyselfandm

To set it in the header, rathan cookie.

grafana.configure({ url: 'XXXapi/dashboards/db', headers: {'Authorization': 'Bearer XXX9'} });

csm0522 avatar Feb 16 '23 11:02 csm0522