Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
Getting error while appending blobs to session using 'https://content.dropboxapi.com/2/files/upload_session/append_v2' in Salesforce LWC JS:
Make sure you check the response body itself. It should contain a more specific error indicating what the issue is.
Response for the callout is:
Error in call to API function "files/upload_session/append:2": The given OAuth 2 access token is malformed.
That error message indicates that there's an issue with the access token value you're supplying with the API call. Check the access token you're sending and make sure you're using the exact value as it was provided to you by Dropbox. Don't add or remove any characters, make sure there's no stray whitespace, etc. (As a matter of security, do not share any access tokens or refresh tokens here.)
Hi Greg, I looked into it and got to know that am not getting the Session_Id in the response of upload_session/start callout. So I tried hitting it with the following snippet:
@varunvyas5678 wrote:Hi Greg, I looked into it and got to know that am not getting the Session_Id in the response of upload_session/start callout. ...
Hi @varunvyas5678,
Once succeeds, the session id is within response body as JSON text. Fetch it out from there. 😉 Take a look here (for example). Why don't you use the official SDK? 🤷
Hope this helps.
@varunvyas5678 I see you're getting back a response with a 200 status code, which indicates the call succeeded, so as Здравко said, you'll need to read out the JSON from the response body to get the session ID. We do recommend using an official SDK whenever possible, as it will do most of the work for you. You can find the instructions for the official Dropbox JavaScript SDK here, for instance.
Hi there!
If you need more help you can view your support options (expected response time for a 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!