You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
dcam
2 years agoExplorer | Level 4
Refresh token generates an invalid access token?
Guys,
I have obtained a refresh token without problem. I put that in the code to generate an access token, then use the access token to gain access to my files and folders. However, when using ...
- 2 years ago
First, by "MY ACCESS ID" and "MY_ID" I expect you mean your app key, and by "MY_PASSWORD" you mean your app secret, as this wouldn't work otherwise.
Anyway, I just tried this out with an app with the app folder access type, and it did not create a duplicate app folder.
Did you previously create, connect, and then delete an app registration, and then create another app with the same name and connect that new app? When you first connect an app with the app folder access type, Dropbox will create a new app folder for that app; it won't re-use any existing folders or app folders (e.g., for other apps) even if they happen to have the same name. If there is another folder with the same name, Dropbox will add "(1)", etc., to find a name that isn't already used when creating the new app folder.
dcam
Explorer | Level 4
Ok, I found out the problem.
Here is what I do to get a fresh token:
1) getting an authorization code from my bowser:
https://www.dropbox.com/oauth2/authorize?client_id=<MY ACCESS ID>&token_access_type=offline&response_type=code
2) After getting the authorization code, I put it in to run a curl from browser to obtain my refresh token:
curl https://api.dropbox.com/oauth2/token \
-d code=<THE AUTHORIZATION CODE> \
-d grant_type=authorization_code \
-u MY_ID:MY_PASSWORD
This will get me a 'refresh_token" and an "access_token". However, when I look at my app folder, an additional folder was created by this call! For example, my app folder is "CallRecords", the new folder "CallRecords (1)" was created by the above curl command without any content in it. Could you please explain why it was created?
Thanks!
Greg-DB
2 years agoDropbox Staff
First, by "MY ACCESS ID" and "MY_ID" I expect you mean your app key, and by "MY_PASSWORD" you mean your app secret, as this wouldn't work otherwise.
Anyway, I just tried this out with an app with the app folder access type, and it did not create a duplicate app folder.
Did you previously create, connect, and then delete an app registration, and then create another app with the same name and connect that new app? When you first connect an app with the app folder access type, Dropbox will create a new app folder for that app; it won't re-use any existing folders or app folders (e.g., for other apps) even if they happen to have the same name. If there is another folder with the same name, Dropbox will add "(1)", etc., to find a name that isn't already used when creating the new app folder.
- dcam2 years agoExplorer | Level 4
This is exactly what happened. I create a folder in the app, then deleted it. Later on, I re-created the folder with the same name! Trying this on a new folder, it works.
Thanks!
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,882 PostsLatest Activity: 3 years agoIf you need more help you can view your support options (expected response time for an email or 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!