Sign inSign up

jerryin/aliyundrive-sign

By jerryin

•Updated almost 2 years ago

This project is an auto sign-in tool for Aliyun Drive, sending sign-in results to DingTalk.

Image
0

1.2K

jerryin/aliyundrive-sign repository overview

⁠Aliyun Drive Auto Sign-In

This project is an auto sign-in tool designed to sign in to Aliyun Drive and send the sign-in results to DingTalk.

Aliyun Drive sign-in interface has introduced signatures. The signature algorithm is not yet known. Automatic sign-in is currently not possible. Only notifications are available.

⁠Purpose

This tool automates the sign-in process for Aliyun Drive and sends the sign-in results to DingTalk for timely status updates.

⁠How to Use

You can run this project using either environment variables or a configuration file.

⁠Run with Environment Variables

Before running the project, ensure you have obtained the refresh_token for Aliyun Drive and the access_token and secret for the DingTalk custom robot. Then, you can run the project with the following command:

docker run -d --name aliyundrive-sign --restart=unless-stopped \
 -e ALIYUNDRIVE_REFRESH_TOKENS="your aliyundrive refresh_token" \
 -e DINGTALK_ACCESS_TOKEN="your dingtalk custom robot access_token" \
 -e DINGTALK_SECRET="your dingtalk custom robot secret" \
 -e SCHEDULE_CRON="0 8 * * *" \
 jerryin/aliyundrive-sign
Variable NameRequiredDescription
ALIYUNDRIVE_REFRESH_TOKENSYesAliyun Drive refresh_token, you can add multiple tokens separated by a comma (,), without spaces
DINGTALK_ACCESS_TOKENNoaccess_token of the custom robot Webhook Custom Robot Official Instructions⁠
DINGTALK_SECRETNosecret for signing the custom robot Webhook
SCHEDULE_CRONNoCron schedule for the task. Default: 0 8 * * *
⁠Run with Configuration File

You can also run this project using a configuration file. Before running the project, ensure you have created a configuration file and mounted it to the Docker container. Here is a sample configuration file:

[aliyundrive]
refresh_tokens = xxxx,xxxx

[dingtalk]
access_token =
secret =

[schedule]
cron = 0 8 * * *

[log]
loglevel = INFO

Run the project with the following command:

docker run -d --name aliyundrive-sign --restart=unless-stopped \
 -v path/to/config.ini:/app/config.ini \
 jerryin/aliyundrive-sign

⁠How to Obtain Aliyun Drive's refresh_token

  • To obtain your Aliyun Drive refresh_token, follow these steps:
  1. Log in to the Aliyun Drive website.
  2. Press F12 to open the browser's developer tools.
  3. Select the Application tab.
  4. In the left navigation bar, select Local Storage -> https://www.aliyundrive.com⁠.
  5. Find the token key under localStorage and copy the refresh_token to your configuration file or environment variable.
  • Alternatively, after logging in to Aliyun Drive, paste the following in the console: JSON.parse(localStorage.token).refresh_token

⁠License

This project is released under the MIT License. Please see the LICENSE⁠ file for more information.

⁠Contact Information

If you have any questions or feedback, please contact me through the GitHub page of this project.

Tag summary

Content type

Image

Digest

sha256:89be4a720…

Size

15.3 MB

Last updated

almost 2 years ago

docker pull jerryin/aliyundrive-sign