Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion zcrmsdk/OAuthClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,13 @@ def get_user_email_from_iam(self,accessToken):
header={ZohoOAuthConstants.AUTHORIZATION:(ZohoOAuthConstants.OAUTH_HEADER_PREFIX+accessToken)}
connector=ZohoOAuthHTTPConnector.get_instance(ZohoOAuth.get_user_info_url(),None,header,None,ZohoOAuthConstants.REQUEST_METHOD_GET)
response=connector.trigger_request()
return response.json()['Email']
data = response.json()
if data.get('response') == 'error':
raise ZohoOAuthException((
"Exception occured while fetching email from iam ; "
"Response is: {0}"
).format(data))
return data['Email']

class ZohoOAuthTokens(object):
'''
Expand Down