You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Otavio Rodolfo Piske (Jira)" <ji...@apache.org> on 2022/06/05 07:25:00 UTC

[jira] [Comment Edited] (CAMEL-17941) Dropbox: long-lived access tokens are retired, must use refresh token

    [ https://issues.apache.org/jira/browse/CAMEL-17941?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17550174#comment-17550174 ] 

Otavio Rodolfo Piske edited comment on CAMEL-17941 at 6/5/22 7:24 AM:
----------------------------------------------------------------------

[~rhuanrcoha] It's the same process as for the main one, except that the target branch is the one we use for 3.14.x development instead of main.

Thanks for contributing this fix!

Edit: more specifically, checkout the 3.14.x, cherry-pick/work on the change/etc, send a PR for that.


was (Author: orpiske):
[~rhuanrcoha] It's the same process as for the main one, except that the target branch is the one we use for 3.14.x development instead of main.

Thanks for contributing this fix!

> Dropbox: long-lived access tokens are retired, must use refresh token
> ---------------------------------------------------------------------
>
>                 Key: CAMEL-17941
>                 URL: https://issues.apache.org/jira/browse/CAMEL-17941
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-dropbox
>    Affects Versions: 3.16.0
>         Environment: Camel 3.16.0
> SpringBoot 2.6.4
> Java 11
>            Reporter: Reto Peter
>            Priority: Major
>             Fix For: 3.18.0
>
>
> The API used to access dropbox currently only supports the parameter "accesstoken"
> for ex. in the route:
> .to("dropbox://put?{*}accessToken{*}={{{{{}dropbox.accessToken{}}}}}"
>                     + "&clientIdentifier={{{{{}dropbox.clientIdentifier{}}}}}"
>                     + "&uploadMode=force"
>                     + "&remotePath=/to_cellular{*}/{*}")
> (by the way, the last '{*}/{*}' at remotePath is needed, otherwise the upload fails with '{*}KO{*}')
> After creating an access token inside the dropbox console and use it inside the route, the API works, but it will only work for {*}4 hours{*}, after that, the following error message will be thrown:
> {*}InvalidAccessTokenException{*}: {"error_summary": "{*}expired_access_token{*}/...", "error": \{".tag": "expired_access_token"}}
> Dropbox did change their strategy and not supporting long-lived access tokens anymore.
> From the dropbox documentation: On September 30th, 2021, Dropbox will retire the creation of long-lived access tokens. Apps that require background (“offline”) access but have not yet implemented *refresh tokens* will be impacted.
> {*}Implement refresh tokens{*}: For apps that want to interact with the Dropbox API when a user isn’t actively interacting with the app (“offline” access)", we offer a long-lived refresh_token that can be used to request a new, short-lived access token.
> see here: [https://dropbox.tech/developers/migrating-app-permissions-and-access-tokens]
> Therefore I think there must be an adjustment in the API Camel is using.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)