Skip to content
This repository was archived by the owner on Jan 13, 2022. It is now read-only.

Commit 9be6079

Browse files
author
Mike Krieger
committed
Merge pull request #12 from akumria/fixup-https
Disable SSL validation.
2 parents c95107c + fef1e63 commit 9be6079

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

instagram/oauth2.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def get_authorize_url(self, scope=None):
9090
return self._url_for_authorize(scope = scope)
9191

9292
def get_authorize_login_url(self, scope=None):
93-
http_object = Http()
93+
http_object = Http(disable_ssl_certificate_validation=True)
9494

9595
url = self._url_for_authorize(scope = scope)
9696
response, content = http_object.request(url)
@@ -101,7 +101,7 @@ def get_authorize_login_url(self, scope=None):
101101

102102
def exchange_for_access_token(self, code=None, username=None, password=None, scope=None, user_id=None):
103103
data = self._data_for_exchange(code, username, password, scope = scope, user_id = user_id)
104-
http_object = Http()
104+
http_object = Http(disable_ssl_certificate_validation=True)
105105
url = self.api.access_token_url
106106
response, content = http_object.request(url, method="POST", body=data)
107107
parsed_content = simplejson.loads(content)
@@ -204,5 +204,5 @@ def prepare_request(self, method, path, params, include_secret=False):
204204
def make_request(self, url, method="GET", body=None, headers={}):
205205
if not 'User-Agent' in headers:
206206
headers.update({"User-Agent":"%s Python Client" % self.api.api_name})
207-
http_obj = Http()
207+
http_obj = Http(disable_ssl_certificate_validation=True)
208208
return http_obj.request(url, method, body=body, headers=headers)

0 commit comments

Comments
 (0)