We’re Still Here to Help (Even Over the Holidays!) - find out more here.
APIs
55 Topics409 - Internal Error
I am having an intermittent issue with checking the status of async share jobs. Below is the flow I'm building and below that an real error being returned by the API. This is for an internal Dropbox app that we are building and is not yet in "production" mode. The Flow: 1) Create new folder inside the team space/folder 2) Create 13 subfolders inside that folder 3) Check the status of sharing each subfolder, polling every 5 seconds until it is "complete" 4) Finally, we add one of our groups to that folder via the "add_folder_member" endpoint. We ALWAYS create the parent folder successfully. Typically the error occurs around the 3rd or 4th subfolder. This is currently blocking our integration so any feedback or help would be deeply appreciated. POST https://api.dropboxapi.com/2/sharing/check_share_job_status Dropbox-API-Select-Admin: "XX" Dropbox-API-Path-Root: "{\".tag\":\"namespace_id\",\"namespace_id\":\"6925873200\"}" Authorization: "Bearer XXX" User-Agent: "Faraday v1.0.0" content-type: "application/json" {"async_job_id":"dbjid:AAAk3C8gUV9HTzIJurjlHh32N2KlIfZ3pgHAgOVrN88ewvaV-fKy-HdKvNPhc7w4JCDB3jxHEsPMJnaOfrVwXhq5"} Status 409 server: "nginx" date: "Fri, 17 Jan 2020 22:06:28 GMT" content-type: "application/json" transfer-encoding: "chunked" connection: "close" content-security-policy: "sandbox; frame-ancestors 'none'" x-dropbox-request-id: "21f7ab0bb9e6390b090c5c60050ed683" x-frame-options: "DENY" x-content-type-options: "nosniff" content-disposition: "attachment; filename='error'" {"error_summary": "internal_error/.", "error": {".tag": "internal_error"}}2.9KViews0likes9CommentsRetrieve folders recursively
I'm using 2/files/list_folder and 2/files/list_folder/continue. However, there are a couple hundred thousand files here which makes it nearly impossible to get a simple folder structure. Having to parse a huge JSON response looking for .tag="folder", especially over multiple cursors, is untenable. Is there a way to add a filter to this request to retrieve only ".tag": "folder" entries? Thanks, Chris382Views0likes8CommentsOAuth broken (Missing client_id) if force_reauthentication=true
Hello, Today it is not possible to authorize an application using OAuth if the parameter force_reauthentication is set to true (force_reauthentication=true) The same error is displayed with the parameter prompt=login For example this url: https://www.dropbox.com/oauth2/authorize?client_id=6m49bsosxta8vpm&state=188620817&response_type=code&force_reauthentication=true&redirect_uri=http%3a%2f%2f127.0.0.1%3a35831%2f&token_access_type=offline&code_challenge_method=S256&code_challenge=omq_TXM9aH8GIlhUx6xT9-D20Ckz6Z46LMrWU2_uOn0 shows the error Missing client_id although the client_id is included in the request. However, the same url but with force_reauthentication=false works fine: https://www.dropbox.com/oauth2/authorize?client_id=6m49bsosxta8vpm&state=188620817&response_type=code&force_reauthentication=false&redirect_uri=http%3a%2f%2f127.0.0.1%3a35831%2f&token_access_type=offline&code_challenge_method=S256&code_challenge=omq_TXM9aH8GIlhUx6xT9-D20Ckz6Z46LMrWU2_uOn0 Please check it as soon as possible as the users are not able to link their accounts with our applications.Solved360Views0likes6CommentsProblem accessing Dropbox API from an embedded device
I’m using a Seeed Studio XIAO ESP32S3 board programmed with Adafruit CircuitPython 9.2.7. I have written a very lite “SDK” to be able to issue requests to Dropbox API (V2) for a limited number of operations: (re)authentication, get_user_account, list_folder, upload_file. My code is available here https://github.com/istvanzk/xiaocam_cpy The initial OAuth2 authorization works fine. I request "offline" access during the OAuth app authorization flow on a development machine, not the XIAO board. Then I use the received "refresh token" (stored in settings.toml) to programmatically get a new short-lived access token at any point in time, without further manual user interaction, in the code running on the XIAO board. Problem: I'm having a strange error when sending any POST request to Dropbox API (V2) host and route, e.g. to https://api.dropboxapi.com/2/users/get_current_account and with the headers set according to the https://www.dropbox.com/developers/documentation/http/documentation#users-get_current_account info. Authentication token is correct because it works after the below described ‘fix’ below. The error "OSError: [Errno 116] ETIMEDOUT" is thrown by a socket.recv_into(result) line (from the original adafruit_requests.py implementation code) meant to check the first character/byte of the response from the server (checked to be “H”). Strangely the only way I found to 'solve' this error here was to insert a time.sleep(0.02) before each of the corresponding request data is sent with socket.send() The observed error is described in more details in the https://github.com/istvanzk/xiaocam_cpy?tab=readme-ov-file#adafruit_requests_fix section, with additional discussions and attempts to debug it on the Adafruit_CircuitPython_Requests issue #209. The error can be reproduced using the https://github.com/istvanzk/xiaocam_cpy/blob/main/dbx_test.py code when the original adafruit_requests module is used instead of my modified https://github.com/istvanzk/xiaocam_cpy/blob/main/adafruit_requests_fix.py. Question #0: Is there a particular way the Dropbox API server handles the socket requests/connections? I could not find anything in particular when going through the official Dropbox API Python SDK code, but I might have missed it. Question #1: After applying the 'fix' described above, the image file upload times are unexpectedly very large e.g., it was approx. 20 seconds for an image of 50KB. Combined with Q#0 it seems the connection is somehow rate limited but I was not able to find the reasons for this. NOTE: I had to remove all links in this post due to theSolved339Views0likes5CommentsThis app is not valid when trying to authenticate with Oauth
I'm trying to connect Salesforce to Dropbox and I've created an app on Dropbox. I've set up the Auth provider and have a URI redirect setup, but no matter if I use the actual URI or localhost, I always get the "This app is not valid" error message. I went so far as to build the URL manually to connect : https://www.dropbox.com/oauth2/authorize?response_type=code&scope=files.content.write+file_requests.write&state=12345&client_id=clientID&redirect_uri=http://localhost I've verified the App key as the client id several times and it's correct. I've tried using a browser in incognito mode. I've tried re-creating the app from scratch and doing it all again. The status of the app is Development, but that seems correct, as I'm just trying to connect to it myself. Any obvious issues?311Views0likes3CommentsApp Scope: Individual vs Team Scope Difference
Currently, I have an app that has read scope for team member (individual scope) but not TEAM scopes. Assuming this limitation persists with my app, can team folders still be scanned just like regular folders in a member's account if my app has scope for that accountId? For example, Team ABC has 2 members, Y and Z. My app has scope access to both members' accounts. I can scan both of their accounts, including the team folder in each account - is this the correct assumption? I understand that I would have duplicates if this is the correct assumption.Solved305Views0likes1CommentUpload multiple files in session
Backstory I have a bunch of small PDFs (18 kb each). filesUpload worked until I understood that a `429` is quite usual. Researched and found the batch endpoints. I wanted to use `/upload_session/start_batch`, `/upload_session/append_batch` & `/upload_session/finish_batch` to upload all files in a session. For stability I used the JS SDK.....but there is no method for `/upload_session/append_batch` 🧐 I created my own method and used the endpoint directly.....worked. But I got errors in the `finish_batch` Then I thought: If the file size off all PDFs is so small, maybe I can upload them directly in the `start` without any `append` and without batch session. I thought, I can use the one `session_id` returned by the `filesUploadSessionStart` method and then go with `filesUploadSessionFinishBatchV2` and split the uploaded file into the original PDFs. const allContent = concatArrayBuffers(...files.map(({ contents }) => contents)); const startResponse = await dbx.filesUploadSessionStart({ close: true, contents: allContent, }); const batchData = files.reduce( (acc, cur) => { acc.entries.push({ cursor: { session_id: startResponse.result.session_id, offset: acc.offset, }, commit: { autorename: true, mode: "add", mute: false, path: cur.path, }, }); acc.offset += cur.contents.byteLength; return acc; }, { offset: 0, entries: [], } ).entries; await dbx.filesUploadSessionFinishBatchV2({ entries: batchData.map(({ commit, cursor }) => ({ commit, cursor })), }); This is the code. Questions What is a session exactly? What is an entry exactly? Can I access one session from multiple entries in a `filesUploadSessionFinishBatchV2`? Where am I going wrong?300Views0likes4CommentsDropbox Cursor Behavior
Hello, I'm trying to confirm cursor behavior. - Is it safe to assume that Cursor is an offset into a transaction log per account, which is a sequential record of changes as they occurred in the account. In other words, clients that traverse dropbox do not walk through their repository (i.e. the "tree" of content) looking for content; instead, the client enumerates changes sequentially as they occurred in Dropbox.298Views0likes5CommentsHow Do I Generate a Temporary Link?
Hi, I was hoping to use the /get_temporary_link endpoint to get a signed URL to access another account's file in my browser. The docs say the URL should not be used to display content directly in the browser, was wondering why and hoping for an example of what use case this endpoint would be appropriate for. Thanks!Solved286Views0likes2CommentsSlow response using Dropbox for Python
Hello, My python code has been working well for months. Within the past 48 hours, the files_download command in the snippet below (with tokens obfuscated) has started to take about 45 seconds while previously it was instantaneous. It is the last line that is the culprit. import dropbox DROPBOX_APP_KEY = "?????" DROPBOX_APP_SECRET = "?????" DROPBOX_REFRESH_TOKEN = "????" dbx = dropbox.Dropbox(app_key=DROPBOX_APP_KEY, app_secret=DROPBOX_APP_SECRET, oauth2_refresh_token=DROPBOX_REFRESH_TOKEN) metadata, f = dbx.files_download('/alerts.csv') Any suggestions? With thanks, David282Views0likes6Comments