Skip to content

Commit

Permalink
Merge pull request googleapis#119 from cfinnberg/master
Browse files Browse the repository at this point in the history
Typo and example of a OAuth2 message creation
  • Loading branch information
Narcolapser authored Sep 17, 2018
2 parents 52a412b + b79da08 commit e576776
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion O365/fluent_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def sendMessage(self, user_id=None, **kwargs):
if user_id:
url = self.send_as_url.format(user_id=user_id)
else:
usl = self.send_url
url = self.send_url
response = (self.oauth, requests)[self.oauth is None].post(
url, data, headers=headers, auth=self.auth, verify=self.verify, **kwargs)
log.debug('response from server for sending message:' + str(response))
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,13 @@ from O365 import Connection, FluentInbox

# Setup connection object
# This will provide you with auth url, open it and authentication and copy the resulting page url and paste it back in the input
Connection.oauth2("your client_id", "your client_secret", store_token=True)
c = Connection.oauth2("your client_id", "your client_secret", store_token=True)

# Proxy call is required only if you are behind proxy
Connection.proxy(url='proxy.company.com', port=8080, username='proxy_username', password='proxy_password')

# Start a message with OAuth2
m = Message(oauth=c.oauth)
```


Expand Down

0 comments on commit e576776

Please sign in to comment.