One month down in 2025: How are your resolutions coming along? Check out how to get back on track here.
Token
2 TopicsShared folder access with Token
Hi! I seem to have a simple access problem with my Token. I am part of a team which has a shared folder which I am trying to access with the API, and while I have it working for files in my own directory: "MY NAME/Folders/Files" the Token doesn't seem to have access to the: "DATA/Folders/Folders/etc" where DATA is shared with me (both through team membership and explicitly) Eventually I'm simply trying to do a recursive files_list_folders() to analyze the storage. In the app console I have both "files.metadata.read" and "sharing.read" turned on, which should be the relevant permissions (and I did re-generate the Token after changing the permissions). Is there something I am missing? Thanks, Martin54Views0likes1CommentApp Script & Dropbox: Expired Access Token Issue - Need Help with Long-Lived Token
Hi Dropbox Community, I've created a Google Apps Script to automatically send copies of modified Excel files as CSV files to my Dropbox. The script uses a Dropbox App Folder (created in the App Console) and works by using a Dropbox access token. The App is simple and doesn't require Redirect URIs, Webhook URIs, etc. My script (snippet below) worked perfectly for several hours, relying solely on the access token: function onEdit(e) { // Configuration const ACCESS_TOKEN = 'DropBox_Access_Token'; const DROPBOX_FOLDER_PATH = 'Folder_Path'; const FILE_NAME = 'data.csv'; // Name of the CSV file in Dropbox // ... (rest of the script) } However, after some time, it stopped working with this error: Error uploading file to Dropbox: Exception: Request failed for https://content.dropboxapi.com returned code 401. Truncated server response: {"error_summary": "expired_access_token/", "error": {".tag": "expired_access_token"}} (use muteHttpExceptions option to examine full response) This clearly indicates the access token has expired. The script's purpose is to run automatically without manual intervention. My question is: how to get long-lived access token and how can I modify my Apps Script to use a long-lived access token or a refresh token mechanism to prevent this token expiration issue? Any guidance or examples would be greatly appreciated. Thanks in advance for your help!94Views0likes2Comments