How I get access code from Dropbox authUrl in Grails from service or test? In Grails Dropbox wiki there is following:
Next user will need to redirect to above authUrl from Step 1 and then DropBox will give you a code.
Is there some Grails or Java way how to get the code without real user redirection?
The reason why I would like that is, that I want to check linked Dropbox files periodically from Grails service.
Is it posible? Thanks in advance!
You seem to be missing reading the next step.
Once the user provides you that code you can use it to generate an access token which you can store and use in the future without having to go through the first two steps again.
As the documentation states:
And last step is to get an access token and it can be easily get by executing accessTokenService.getAccessToken(code). Here you need to pass code to it got by step 2 and then this method will give an access token. Save it anywhere like database or somewhere else for further use.
Then the documentation continues to say:
Next part will give you details about using various DropBox services by using access token got from above part.