Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix DropBox App's api_key and api_secret #914

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

koba-e964
Copy link
Member

@koba-e964 koba-e964 commented Aug 15, 2022

Partial resolution of #912.

#862 credentials went stale due to the limit on the number of users. This PR replaces them with those by @koba-e964.

@koba-e964
Copy link
Member Author

koba-e964 commented Aug 15, 2022

Not working.

$ oj download https://atcoder.jp/contests/arc065/tasks/arc065_b --system --dropbox-token=${DROPBOX_TOKEN}
[INFO] online-judge-tools 11.5.1 (+ online-judge-api-client 10.10.1)
[INFO] load cookie from: /Users/koba_mac/Library/Application Support/online-judge-tools/cookie.jar
[NETWORK] POST: https://api.dropboxapi.com/2/files/list_folder
[NETWORK] 200 OK
[INFO] contest folder found: {'.tag': 'folder', 'name': 'AGC058', 'id': 'id:hjsYZQdnqVAAAAAAAAKPNA'}
[NETWORK] POST: https://api.dropboxapi.com/2/files/list_folder
[NETWORK] 200 OK
[INFO] problem folder found: {'.tag': 'folder', 'name': 'F', 'id': 'id:hjsYZQdnqVAAAAAAAAAnNA'}
[NETWORK] POST: https://api.dropboxapi.com/2/files/list_folder
[NETWORK] 200 OK
[NETWORK] POST: https://content.dropboxapi.com/2/sharing/get_shared_link_file
[NETWORK] 400 Bad Request
[ERROR] 400 Client Error: Bad Request for url: https://content.dropboxapi.com/2/sharing/get_shared_link_file
[HINT] You may need to login to use `$ oj download ...` during contest. Please run: $ oj login https://atcoder.jp/
[INFO] save cookie to: /Users/koba_mac/Library/Application Support/online-judge-tools/cookie.jar

@koba-e964
Copy link
Member Author

Some failing with error code shared_link_access_denied:

[NETWORK] POST: https://api.dropboxapi.com/2/files/list_folder
[NETWORK] 200 OK
[NETWORK] POST: https://content.dropboxapi.com/2/sharing/get_shared_link_file
[NETWORK] 409 Conflict
[ERROR] 409 Client Error: Conflict for url: https://content.dropboxapi.com/2/sharing/get_shared_link_file
[HINT] You may need to login to use `$ oj download ...` during contest. Please run: $ oj login https://atcoder.jp/

@koba-e964 koba-e964 marked this pull request as draft August 15, 2022 07:06
@lightseba
Copy link

@koba-e964 I tried your link and got the same error. It seems like this 409 error was encountered in the initial implementation of this dropbox feature. It seems like someone else tried it again and it worked? Not sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants