diff --git a/redash/query_runner/yandex_metrica.py b/redash/query_runner/yandex_metrica.py index 814b1b8662..82f47d8565 100644 --- a/redash/query_runner/yandex_metrica.py +++ b/redash/query_runner/yandex_metrica.py @@ -115,7 +115,11 @@ def test_connection(self): def _send_query(self, path='stat/v1/data', **kwargs): token = kwargs.pop('oauth_token', self.configuration['token']) - r = requests.get('{0}/{1}'.format(self.host, path), params=dict(oauth_token=token, **kwargs)) + r = requests.get( + '{0}/{1}'.format(self.host, path), + headers={'Authorization': 'OAuth {}'.format(token)}, + params=kwargs + ) if r.status_code != 200: raise Exception(r.text) return r.json()