diff --git a/SE_API/API.py b/SE_API/API.py index 1f79300..340b5f8 100644 --- a/SE_API/API.py +++ b/SE_API/API.py @@ -185,10 +185,11 @@ def oauth(oauth_token): tempName = ";" - if user_data["email"] == "": - for email in userEmails: - if email["primary"] and email["verified"]: - tempEmail = email["email"] + if 'email' in user_data: + if user_data["email"] == "": + for email in userEmails: + if email["primary"] and email["verified"]: + tempEmail = email["email"] else: tempEmail = user_data["email"]