Josh, I can now paste in the URL and get a verifaction value to paste back into python - however, when I paste that back into python i get the following IOError: [Errno 13] Permission denied? Thanks for your help
After approving the token enter the verification code (if specified). Code: 4/8KoOM2TfSyTb6cSSe59bAZFaPM5s0ABLW3aS896xkbU.giHmKxQYIQYUEnp6UAPFm0H4pVvRmQI Traceback (most recent call last): File "<pyshell#30>", line 2, in <module> main() File "<pyshell#26>", line 18, in main credential = flow.step2_exchange(code) File "/Library/Python/2.7/site-packages/oauth2client-1.4.6-py2.7.egg/oauth2client/util.py", line 135, in positional_wrapper return wrapped(*args, **kwargs) File "/Library/Python/2.7/site-packages/oauth2client-1.4.6-py2.7.egg/oauth2client/client.py", line 1932, in step2_exchange headers=headers) File "/Library/Python/2.7/site-packages/httplib2-0.9-py2.7.egg/httplib2/__init__.py", line 1593, in request (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey) File "/Library/Python/2.7/site-packages/httplib2-0.9-py2.7.egg/httplib2/__init__.py", line 1335, in _request (response, content) = self._conn_request(conn, request_uri, method, body, headers) File "/Library/Python/2.7/site-packages/httplib2-0.9-py2.7.egg/httplib2/__init__.py", line 1257, in _conn_request conn.connect() File "/Library/Python/2.7/site-packages/httplib2-0.9-py2.7.egg/httplib2/__init__.py", line 1021, in connect self.disable_ssl_certificate_validation, self.ca_certs) File "/Library/Python/2.7/site-packages/httplib2-0.9-py2.7.egg/httplib2/__init__.py", line 80, in _ssl_wrap_socket cert_reqs=cert_reqs, ca_certs=ca_certs) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 891, in wrap_socket ciphers=ciphers) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 507, in __init__ self._context.load_verify_locations(ca_certs) IOError: [Errno 13] Permission denied On Friday, March 6, 2015 at 10:34:16 AM UTC-8, Josh Radcliff (AdWords API Team) wrote: > > Hi, > > I noticed in your stacktrace that you are creating a *DfpClient*. For > AdWords, however, you should create an *AdWordsClient*. > > It may be helpful to review the following resources: > > - Using OAuth 2.0 guide > <https://github.com/googleads/googleads-python-lib/wiki/Using-OAuth-2.0> > for > the Python library > - generate_refresh_token.py example > > <https://github.com/googleads/googleads-python-lib/blob/master/examples/adwords/authentication/generate_refresh_token.py> > (for > generating your OAuth refresh token) > - get_campaigns.py example > > <https://github.com/googleads/googleads-python-lib/blob/master/examples/adwords/v201409/basic_operations/get_campaigns.py#L76> > > Cheers, > Josh, AdWords API Team > > On Friday, March 6, 2015 at 12:18:22 PM UTC-5, Austin Trombley wrote: >> >> I'm trying to connect to adwords api, and my authentication is failing >> when attempting with both Python and R. >> >> For Python: >> >> >>> if __name__ == '__main__': >> # Initialize client object. >> dfp_client = dfp.DfpClient.LoadFromStorage() >> main(dfp_client) >> >> >> >> Traceback (most recent call last): >> File "<pyshell#10>", line 4, in <module> >> main(dfp_client) >> File "<pyshell#6>", line 15, in main >> statement.ToStatement()) >> File "/Library/Python/2.7/site-packages/googleads/common.py", line 294, >> in MakeSoapRequest >> self._header_handler.SetHeaders(self.suds_client) >> File "/Library/Python/2.7/site-packages/googleads/dfp.py", line 309, in >> SetHeaders >> headers=self._dfp_client.oauth2_client.CreateHttpHeader()) >> File "/Library/Python/2.7/site-packages/googleads/oauth2.py", line 150, >> in CreateHttpHeader >> self.Refresh() >> File "/Library/Python/2.7/site-packages/googleads/oauth2.py", line 166, >> in Refresh >> self.disable_ssl_certificate_validation))) >> File >> "/Library/Python/2.7/site-packages/oauth2client-1.4.6-py2.7.egg/oauth2client/client.py", >> >> line 573, in refresh >> self._refresh(http.request) >> File >> "/Library/Python/2.7/site-packages/oauth2client-1.4.6-py2.7.egg/oauth2client/client.py", >> >> line 744, in _refresh >> self._do_refresh_request(http_request) >> File >> "/Library/Python/2.7/site-packages/oauth2client-1.4.6-py2.7.egg/oauth2client/client.py", >> >> line 773, in _do_refresh_request >> self.token_uri, method='POST', body=body, headers=headers) >> File >> "/Library/Python/2.7/site-packages/httplib2-0.9-py2.7.egg/httplib2/__init__.py", >> >> line 1593, in request >> (response, content) = self._request(conn, authority, uri, >> request_uri, method, body, headers, redirections, cachekey) >> File >> "/Library/Python/2.7/site-packages/httplib2-0.9-py2.7.egg/httplib2/__init__.py", >> >> line 1335, in _request >> (response, content) = self._conn_request(conn, request_uri, method, >> body, headers) >> File >> "/Library/Python/2.7/site-packages/httplib2-0.9-py2.7.egg/httplib2/__init__.py", >> >> line 1257, in _conn_request >> conn.connect() >> File >> "/Library/Python/2.7/site-packages/httplib2-0.9-py2.7.egg/httplib2/__init__.py", >> >> line 1021, in connect >> self.disable_ssl_certificate_validation, self.ca_certs) >> File >> "/Library/Python/2.7/site-packages/httplib2-0.9-py2.7.egg/httplib2/__init__.py", >> >> line 80, in _ssl_wrap_socket >> cert_reqs=cert_reqs, ca_certs=ca_certs) >> File >> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", >> line 891, in wrap_socket >> ciphers=ciphers) >> File >> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", >> line 507, in __init__ >> self._context.load_verify_locations(ca_certs) >> IOError: [Errno 13] Permission denied >> >>> if __name__ == '__main__': >> # Initialize client object. >> dfp_client = dfp.DfpClient.LoadFromStorage() >> main(dfp_client) >> >> >> For R with RAdwords, a browser opens after I enter in my client_id, >> client_secret, and developer token and says Error 400 (OAuth2Error)!!1 and >> that I should email MYSELF for help >> >> library(RAdwords) >> google_auth <- doAuth() >> >> -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and Google+: https://googleadsdeveloper.blogspot.com/ https://plus.google.com/+GoogleAdsDevelopers/posts =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en --- You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/adwords-api. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/741d93a2-cde3-4bee-83b2-091d68be3c99%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.