Skip to content
Open
Show file tree
Hide file tree
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
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# OAuth Integration Demo

Make sure to have Python 3 installed.
Prerequisite: Be sure to have Python 3 installed.

To run the server application, open a command terminal, and navigate to the folder where you saved this Python script.
To run the server application, open a command terminal and navigate to the folder where you saved this Python script.

Replace the required variables (Client ID, Secrect ID etc...) in the oauth.py file on lines 23 and 24, Replace the URL in the <a> tag in
index.html, then run:
Replace the required variables `clientID`, `secretID`, and `redirectURI` (if needed) in the `oauth.py` file on lines 23 and 24. Replace the URL in the <a> tag in index.html, then run:

*python3 oauth.py*

You should see this in the terminal:

```
Listening on http://0.0.0.0:10060...
```

copy and paste above URL into browser and follow prompts
Copy and paste the returned URL into a browser and follow the prompts.

**Note**: Your Redirect_URI in the Integration's settings on Developer Webex Teams site should be: http://0.0.0.0:10060/oauth or if you're using any other hosting platform it would be https://YOUR_SERVER/oauth
**Note**: Your Redirect_URI in the Integration's settings on the Developer Webex Teams site should be: `http://0.0.0.0:10060/oauth`, or if you're using any other hosting platform, it would be `https://YOUR_SERVER/oauth`.
10 changes: 5 additions & 5 deletions oauth.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ def main_page():

"""
Function Name : oauth
Description : After the grant button is click from index.html
and the user logs into thier Webex account, the
Description : After the grant button click from index.html
and the user logs into their Webex account, the
are redirected here as this is the html file that
this function renders upon successful authentication
is granted.html. else, the user is sent back to index.html
Expand All @@ -133,7 +133,7 @@ def oauth():
return render_template("index.html")

"""
Funcion Name : spaces
Function Name : spaces
Description : Now that we have our authentication code the spaces button
on the granted page can leverage this function to get list
of spaces that the user behind the token is listed in. The
Expand All @@ -147,8 +147,8 @@ def spaces():
response = api_call()

print("status code : ", response.status_code)
#Do a check on the response. If the access_token is invalid then use refresh
# tokent to ontain a new set of access token and refresh token.
# Do a check on the response. If the access_token is invalid then use refresh
# token to obtain a new set of access token and refresh token.
if (response.status_code == 401) :
get_tokens_refresh()
response = api_call()
Expand Down