Quantcast
Channel: Questions in topic: "splunk-enterprise"
Viewing all articles
Browse latest Browse all 47296

How to get refresh tokens via Python script?

$
0
0
Hello dear Splunkers, I'm working on a connector between Google Analytics and Splunk. So far, I have everything working, except for one thing: getting a refresh_token. I've implemented the following script at my server (called `client.py`): google-api-python-client. googlecode .com/hg/docs/epy/oauth2client.client-pysrc.html#OAuth2Credentials.__init__ But when I run the script that calls `client.py`, I get the following errors: ./wrapper_ftd_digital_so.sh Traceback (most recent call last): File "/opt/splunk/etc/apps/FTD/bin/ga_ftd_digital_so.py", line 68, in service = autentica(api_name, version, scope, key_file_location, service_email) File "/opt/splunk/etc/apps/FTD/bin/ga_ftd_digital_so.py", line 38, in autentica service = build(api_name, api_version, http=http_auth) File "/usr/lib/python2.6/site-packages/oauth2client/util.py", line 142, in positional_wrapper return wrapped(*args, **kwargs) File "/usr/lib/python2.6/site-packages/googleapiclient/discovery.py", line 196, in build cache) File "/usr/lib/python2.6/site-packages/googleapiclient/discovery.py", line 242, in _retrieve_discovery_doc resp, content = http.request(actual_url) File "/usr/lib/python2.6/site-packages/oauth2client/client.py", line 565, in new_request self._refresh(request_orig) File "/usr/lib/python2.6/site-packages/oauth2client/client.py", line 835, in _refresh self._do_refresh_request(http_request) File "/usr/lib/python2.6/site-packages/oauth2client/client.py", line 900, in _do_refresh_request raise AccessTokenRefreshError(error_msg) oauth2client.client.AccessTokenRefreshError: invalid_grant So I think in my `client.py` script I'm missing passing the `client_id`, `client_secret` and `access_token`. Do you guys know were should I input this info? Best regards!

Viewing all articles
Browse latest Browse all 47296

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>