-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #38 from minds-ai/switch_to_oauth
Switch to Zoom OAuth access
- Loading branch information
Showing
5 changed files
with
76 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
# Zoom-Drive-Connector | ||
|
||
This program downloads meeting recordings from Zoom and uploads them to a | ||
This program downloads meeting recordings from Zoom and uploads them to a | ||
specific folder on Google Drive. | ||
|
||
This software is particularly helpful for archiving recorded meetings and | ||
This software is particularly helpful for archiving recorded meetings and | ||
webinars on Zoom. It can also be used to distribute VODs (videos on demand) to | ||
public folder in Google Drive. This software aims to fill a missing piece of | ||
public folder in Google Drive. This software aims to fill a missing piece of | ||
functionality in Zoom (post-meeting recording sharing). | ||
|
||
## Setup | ||
Create a file called `config.yaml` with the following contents: | ||
```yaml | ||
zoom: | ||
key: "zoom_api_key" | ||
secret: "zoom_api_secret" | ||
username: "[email protected]" | ||
account_id: "Zoom account ID" | ||
client_id: "OAuth client ID" | ||
client_secret: "OAuth client secret" | ||
delete: true | ||
meetings: | ||
meetings: | ||
- {id: "meeting_id" , name: "Meeting Name", folder_id: "Some Google Drive Folder ID", slack_channel: "channel_name"} | ||
- {id: "meeting_id2" , name: "Second Meeting Name", folder_id: "Some Google Drive Folder ID2", slack_channel: "channel_name2"} | ||
drive: | ||
|
@@ -26,23 +26,21 @@ slack: | |
key: "slack_api_key" | ||
internals: | ||
target_folder: "/tmp" | ||
``` | ||
``` | ||
*Note:* It is advised to place this file in the `conf` folder (together with the json credentials) | ||
this folder needs to be referenced when you launch the Docker container (see below). | ||
|
||
You will need to fill in the example values in the file above. In order to | ||
You will need to fill in the example values in the file above. In order to | ||
fill in some of these values you will need to create developer credentials on | ||
several services. Short guides on each service can be found below. | ||
|
||
### Zoom | ||
To get the proper API key and secret, you will need to use the following | ||
"Getting Started Guide" on Zoom's developer site. Link [here](https://developer.zoom.us/docs/windows/introduction-and-pre-requisite/). | ||
Paste the API key and secret into `config.yaml` under the `zoom` section. | ||
https://developers.zoom.us/docs/internal-apps/create/#steps-to-create-a-server-to-server-oauth-app | ||
|
||
It is (currently) not possible to download the recordings via the API key only. | ||
As such you need to specify a user that is part of your organizations Zoom account. | ||
This can be a non-pro user. The e-mail of the user should be added | ||
to the `username` entry under the `zoom` section. | ||
For Zoom the Server-to-Server OAuth app is used. You will need to use the following | ||
[guide](https://developer.zoom.us/docs/windows/introduction-and-pre-requisite/). on the Zoom's | ||
developer site. You need to copy the 'account_id', 'client_id' and 'client_secret' variables into | ||
the `config.yaml` file under the `zoom` section. | ||
|
||
### Google Drive | ||
To upload files to Google Drive you have to login to your developer console, create a new project, | ||
|
@@ -52,15 +50,15 @@ steps: | |
1. Go to the [Google API Console](https://console.developers.google.com/) | ||
2. Click on "Create new project". | ||
3. Give it a name and enter any other required info. | ||
4. Once back on the dashboard click on "Enable APIs and Services" (make sure your newly | ||
4. Once back on the dashboard click on "Enable APIs and Services" (make sure your newly | ||
created project is selected). | ||
5. Search for and enable: "Google Drive API". | ||
6. Go back to the dashboard and click on "Credentials" in the left side bar. | ||
7. On the credentials screen click on the "Create credentials" button and select "OAuth client ID". | ||
8. Follow the instructions to set a product name, on the next screen only the `Application name` | ||
is required. Enter it and click on "save". | ||
9. As application type, select "Other" and fill in the name of your client. | ||
10. Now under "OAuth 2.0 client IDs" download the JSON file for the newly create client ID | ||
10. Now under "OAuth 2.0 client IDs" download the JSON file for the newly create client ID | ||
11. Save this file as `client_secrets.json` in the `conf` directory. | ||
|
||
The `credentials` file will be created during the first start (see below). | ||
|
@@ -75,9 +73,9 @@ The `credentials` file will be created during the first start (see below). | |
|
||
## Running the Program | ||
The first time we run the program we have to authenticate it with Google and accept the required | ||
permissions. For this we run the docker container in the interactive mode such that we | ||
permissions. For this we run the docker container in the interactive mode such that we | ||
can enter the generated token. Instructions on how to pull Docker images from the Github | ||
registry can be found | ||
registry can be found | ||
[here](https://help.github.com/en/articles/configuring-docker-for-use-with-github-package-registry#authenticating-to-github-package-registry). | ||
|
||
```bash | ||
|
@@ -86,14 +84,14 @@ $ docker run -i -v /path/to/conf/directory:/conf \ | |
docker.pkg.github.com/minds-ai/zoom-drive-connector/zoom-drive-connector:1.2.0 | ||
``` | ||
|
||
Alternatively, you can clone the repository and run `make build VERSION=1.2.0` to build | ||
Alternatively, you can clone the repository and run `make build VERSION=1.2.0` to build | ||
the container locally. In this case, you will need to exchange the long image name | ||
with the short-form one (`zoom-drive-connector:1.2.0`). | ||
|
||
This will print an URL, this URL should be copied in the browser. After accepting the | ||
permissions you will be presented with a token. This token should be pasted in the | ||
terminal. After the token has been accepted a `credentials.json` file will have been | ||
created in your configuration folder. You can now kill (`ctrl-C`) the Docker container | ||
This will print an URL, this URL should be copied in the browser. After accepting the | ||
permissions you will be presented with a token. This token should be pasted in the | ||
terminal. After the token has been accepted a `credentials.json` file will have been | ||
created in your configuration folder. You can now kill (`ctrl-C`) the Docker container | ||
and follow the steps below to run it in the background. | ||
|
||
Run the following command to start the container after finishing the setup process. | ||
|
@@ -103,17 +101,17 @@ $ docker run -d -v /path/to/conf/directory:/conf \ | |
``` | ||
|
||
## Making Changes to Source | ||
If you wish to make changes to the program source, you can quickly create a | ||
If you wish to make changes to the program source, you can quickly create a | ||
Conda environment using the provided `environment.yml` file. Use the following | ||
commands to get started. | ||
```bash | ||
$ conda env create -f environment.yml | ||
$ source activate zoom-drive-connector | ||
``` | ||
``` | ||
|
||
Any changes to dependencies should be recorded in **both** `environment.yml` and | ||
`requirements.txt` with the exception of development dependencies, which | ||
only have to be placed in `environment.yml`. Make sure to record the version of the | ||
`requirements.txt` with the exception of development dependencies, which | ||
only have to be placed in `environment.yml`. Make sure to record the version of the | ||
package you are adding using the double-equal operator. | ||
|
||
To run the program in the conda environment you can use the following command line: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
pyjwt==1.5.3 | ||
pyyaml>=5.1 | ||
slackclient==1.2.1 | ||
schedule==0.5.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters