OAuth2 and Dropbox
Posted: Thu Apr 18, 2019 1:09 pm
I am trying to get the user of my app to allow access to his dropbox. I have taken the code from the Dictionary which should work. When OAuth is called, a stack window pops up with the authorisation from dropbox but quickly disappears again before the user can authorise the app. Here's the code:
There's obviously more to this example but not many places to find any other working examples. Has anyone managed and if so, please share your solution.
Code: Select all
constant kAuthURL = "https://www.dropbox.com/oauth2/authorize"
constant kTokenURL = "https://api.dropboxapi.com/oauth2/token"
constant kClientID = "xxxxxx"
constant kClientSecret = "xxxxxxx"
constant kScopes = ""
OAuth2 kAuthURL, kTokenURL, kClientID, kClientSecret, kScopes, 80
if the result is not empty then (Result empty)
answer error "Not authorized!"
else
local tAuth
put it into tAuth tAuth EMPTY since no user interaction?
end if