I seem to be having an issue with SSL whenever trying to use oAuth2 in Python. I\'ve spent most of the afternoon attempting to debug it but can\'t seem to figure it out.
I was having the same error on my system (OSX Yosemite) which had an old version of Python 2.7 installed (2.7.1).
I upgraded Python to 2.7.10 which solved the problem.
https://www.python.org/downloads/release/python-2710/
The clue was in the following warning message which I saw while I was experimenting with different solutions:
"InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning"