Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit487793d

Browse files
authored
Update the commandline-oauth-scopes.py example (dropbox#470)
1 parent223fe46 commit487793d

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

‎example/oauth/commandline-oauth-scopes.py‎

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
try:
2525
oauth_result=auth_flow.finish(auth_code)
26-
#Oauth token has files.metadata.read scope only
26+
#authorization has files.metadata.read scope only
2727
assertoauth_result.scope=='files.metadata.read'
2828
exceptExceptionase:
2929
print('Error: %s'% (e,))
@@ -33,7 +33,7 @@
3333
auth_flow2=DropboxOAuth2FlowNoRedirect(APP_KEY,
3434
consumer_secret=APP_SECRET,
3535
token_access_type='offline',
36-
scope=['files.metadata.write'])
36+
scope=['account_info.read'])
3737

3838
authorize_url=auth_flow2.start()
3939
print("1. Go to: "+authorize_url)
@@ -43,8 +43,8 @@
4343

4444
try:
4545
oauth_result=auth_flow2.finish(auth_code)
46-
#Oauth tokenhasfiles.metadata.write scope only
47-
assertoauth_result.scope=='files.metadata.write'
46+
#authorizationhasaccount_info.read scope only
47+
assertoauth_result.scope=='account_info.read'
4848
exceptExceptionase:
4949
print('Error: %s'% (e,))
5050
exit(1)
@@ -66,8 +66,8 @@
6666
try:
6767
oauth_result=auth_flow3.finish(auth_code)
6868
print(oauth_result)
69-
#Oauth token has all granted user scopes
70-
assert'files.metadata.write'inoauth_result.scope
69+
#authorization has all granted user scopes
70+
assert'account_info.read'inoauth_result.scope
7171
assert'files.metadata.read'inoauth_result.scope
7272
assert'files.content.read'inoauth_result.scope
7373
assert'files.content.write'inoauth_result.scope
@@ -80,5 +80,6 @@
8080
oauth2_access_token_expiration=oauth_result.expires_at,
8181
oauth2_refresh_token=oauth_result.refresh_token,
8282
app_key=APP_KEY,
83-
app_secret=APP_SECRET):
83+
app_secret=APP_SECRET)asdbx:
84+
dbx.users_get_current_account()
8485
print("Successfully set up client!")

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp