Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
Hi,
I was using Java SDK v1.7 and have stored access tokens of my users in database. I realized that I need to have access token key and access token secret when I wanted to automatically upgrade access tokens to v2.
But I do not know how to get those access token secrets. I am not aware that SDK v1 was providing such functionality to get both values, only access token.
DbxAuthFinish contains method getAccessToken to get only access token. And it was the last step when doing oauth dance.
Can you suggest me how to continue with the migration, please?
Thanks
Ah, I see. If you have been using the `getAccessToken()` method for access tokens, then you do not need to perform a token migration, as you are already using OAuth 2.0 tokens, which work for both API v1 and API v2.
Is this the case for you?
Thanks for reaching out. I would recommend taking a look at the DbxOAuth1Upgrader class, which allows you to migrate OAuth 1.0 tokens to OAuth 2.0 tokens.
In OAuth 2.0, there is no access token secret, only an access token.
Please let me know if you have additional questions. Thank you!
I can see method:
String createOAuth2AccessToken(DbxOAuth1AccessToken token)
which takes access token object of version 1 but when you want to create the object you have to pass to the constructor:
public DbxOAuth1AccessToken(String key, String secret)
and I do not have secret ...
Ah, I see. If you have been using the `getAccessToken()` method for access tokens, then you do not need to perform a token migration, as you are already using OAuth 2.0 tokens, which work for both API v1 and API v2.
Is this the case for you?
Hi there!
If you need more help you can view your support options (expected response time for a ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!