We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
giullianoa
9 years agoExplorer | Level 4
Migration token OAuth 1 to Oauth 2
Good Afternoon I triyed to update my OAuth 1 token to OAuth 2 through this HTTP request : https://api.dropboxapi.com/2/auth/token/from_oauth1 But the response looks like this : {"error_s...
giullianoa
9 years agoExplorer | Level 4
Forget about it..
I get the access but, has something change in getMetadataWithChildren parameters ?
Every path passed in the parameter return "null".
Greg-DB
Dropbox Community Moderator
9 years agoThe https://www.dropbox.com/developers/documentation link is for the HTTP interface itself.
We don't have plans for an official PHP SDK for Dropbox API v2, but you can use a third party library if you don't want to call the HTTPS endpoints directly:
https://www.dropbox.com/developers/documentation/communitysdks
For reference, to upload files, you can use:
https://www.dropbox.com/developers/documentation/http/documentation#files-upload
To get metadata for a file or folder, you should use:
https://www.dropbox.com/developers/documentation/http/documentation#files-get_metadata
To list the contents of a folder, you should use:
https://www.dropbox.com/developers/documentation/http/documentation#files-list_folder
https://www.dropbox.com/developers/documentation/http/documentation#files-list_folder-continue
If you use a third party library instead of these endpoints directly, there should be corresponding methods for each of those.
We don't have plans for an official PHP SDK for Dropbox API v2, but you can use a third party library if you don't want to call the HTTPS endpoints directly:
https://www.dropbox.com/developers/documentation/communitysdks
For reference, to upload files, you can use:
https://www.dropbox.com/developers/documentation/http/documentation#files-upload
To get metadata for a file or folder, you should use:
https://www.dropbox.com/developers/documentation/http/documentation#files-get_metadata
To list the contents of a folder, you should use:
https://www.dropbox.com/developers/documentation/http/documentation#files-list_folder
https://www.dropbox.com/developers/documentation/http/documentation#files-list_folder-continue
If you use a third party library instead of these endpoints directly, there should be corresponding methods for each of those.
- giullianoa9 years agoExplorer | Level 4
I'm almost done..
When I make upload chunked in the moment to append the existing files already uploaded I got this response :
Unexpected HTTP status 409 {"error_summary": "incorrect_offset/.", "error": {".tag": "incorrect_offset", "correct_offset": 15}}
Why the correct_offset is 15 ?
The operation to calculate the byteOffset is wrong ?
Gratefull to help me in this situation !
- Greg-DB9 years ago
Dropbox Community Moderator
The correct_offset value indicates what byte index in the upload the Dropbox API servers expect next. This may not always match what your app expects, e.g., in cases where the app and server were unable to communicate. For example, if a previous request was received, but the response never made it to the app.
When this happens, you should resume the upload session at the specified offset. - giullianoa9 years agoExplorer | Level 4
Something is stranged to me because the server expect 15 for value to offset. Is this number to small ? Do you think so ?
I
- Greg-DB9 years ago
Dropbox Community Moderator
Yes, I would expect the value should be at least the size of one chunk (e.g., if only one chunk succeeded). What chunk size are you using? We generally recommend something much larger than 15, e.g., 8 MB (8388608 bytes). - giullianoa9 years agoExplorer | Level 4
I got it !
I'm using the same as the PHP SDK.
I'm using 4194304. // 4 MB
It could be another thing ?
- Greg-DB9 years ago
Dropbox Community Moderator
Can you share some code to reproduce the issue? I'm not sure off hand what the issue may be, but we'll be happy to look into it. Thanks in advance!
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If 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, Facebook or Instagram.
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!