-
Notifications
You must be signed in to change notification settings - Fork 30
Dropbox
Damien edited this page Jun 5, 2016
·
1 revision
let dropbox: Provider = .Dropbox(
clientID: "***",
clientSecret: "***"
redirectURL: "foo://callback"
)
{"access_token": "ABCDEFG", "token_type": "bearer", "uid": "12345"}
-
response_type required The grant type requested, either
token
orcode
. - client_id required The app's key, found in the App Console.
-
redirect_uri Where to redirect the user after authorization has completed. This must be the exact URI registered in the App Console; even 'localhost' must be listed if it is used for testing. A redirect URI is required for a
token
flow, but optional forcode
. If the redirect URI is omitted, thecode
will be presented directly to the user and they will be invited to enter the information in your app. - state Up to 500 bytes of arbitrary data that will be passed back to your redirect URI. This parameter should be used to protect against cross-site request forgery (CSRF). See Sections 4.4.1.8 and 4.4.2.5 of the OAuth 2.0 threat model spec.
-
require_role If specified, the user will be asked to authorize with a particular type of Dropbox account, either
work
for a Dropbox for Business account orpersonal
for a personal account. Your app should still verify the type of Dropbox account after authorization since the user could modify or remove therequire_role
parameter. -
force_reapprove Whether or not to force the user to approve the app again if they've already done so. If
false
(default), a user who has already approved the application may be automatically redirected to the URI specified byredirect_uri
. Iftrue
, the user will not be automatically redirected and will have to approve the app again. - disable_signup When true (default is false) users will not be able to sign up for a Dropbox account via the authorization page. Instead, the authorization page will show a link to the Dropbox iOS app in the App Store. This is only intended for use when necessary for compliance with App Store policies.
-
code required The code acquired by directing users to
/oauth2/authorize?response_type=code
. -
grant_type required The grant type, which must be
authorization_code
. -
client_id If credentials are passed in
POST
parameters, this parameter should be present and should be the app's key (found in the App Console). -
client_secret If credentials are passed in
POST
parameters, this parameter should be present and should be the app's secret. -
redirect_uri Only used to validate that it matches the original
/oauth2/authorize
, not used to redirect again.