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
cascadeCommons
5 years agoExplorer | Level 4
Javascript Timestamp Format
Hello everyone.
I'm using the Javascript SDK to create File Requests via the API. Everything was working fine, but I recently upgraded to a Dropbox Professional account and tried to add the "de...
- 5 years ago
I see you also sent this in to support, so I'm copying the answer that we sent you there here in case anyone else has the same question:
ThefileRequestsCreate
method takes aFileRequestsCreateFileRequestArgs
object, whereFileRequestsCreateFileRequestArgs.deadline
should be aFileRequestsFileRequestDeadline
, whereFileRequestsFileRequestDeadline.deadline
should be a timestamp string with this format:%Y-%m-%dT%H:%M:%SZ
Apologies that isn't specifically shown in the JavaScript SDK documentation. I'll ask the team to improve that. For reference though, you can find the documentation for the HTTPS endpoints themselves here, such as for /2/file_requests/create, which is whatfileRequestsCreate
uses, showing the specific expected string formats.
So, the code should look like this:var deadline = {"deadline": "2020-10-31T12:34:56Z"};
dbx.fileRequestsCreate({title: theTitle, destination: dbxDestination, deadline: deadline, open: true})
Greg-DB
5 years agoDropbox Staff
I see you also sent this in to support, so I'm copying the answer that we sent you there here in case anyone else has the same question:
The fileRequestsCreate
method takes a FileRequestsCreateFileRequestArgs
object, where FileRequestsCreateFileRequestArgs.deadline
should be a FileRequestsFileRequestDeadline
, where FileRequestsFileRequestDeadline.deadline
should be a timestamp string with this format:%Y-%m-%dT%H:%M:%SZ
Apologies that isn't specifically shown in the JavaScript SDK documentation. I'll ask the team to improve that. For reference though, you can find the documentation for the HTTPS endpoints themselves here, such as for /2/file_requests/create, which is what fileRequestsCreate
uses, showing the specific expected string formats.
So, the code should look like this:
var deadline = {"deadline": "2020-10-31T12:34:56Z"};
dbx.fileRequestsCreate({title: theTitle, destination: dbxDestination, deadline: deadline, open: true})
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,910 PostsLatest Activity: 4 days 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!