I have very particular situation when I cannot use request header at all and I'm basically need to pass all the parameters as URL parameters. It is not a problem for the v1 API. For example with this request I can easily upload a file
However it does not seem to be possible with v2 API. Specification says "These endpoints accept file content in the request body, so their arguments are instead passed as JSON in the Dropbox-API-Arg request header or arg URL parameter", So there seems to be hope it should work but it either does not accept parameters in URL or access_token parameters is not accepted.
Hi Alexander, yes, you can pass the arguments on the URL. You cited the right documentation, but your implementation isn't quite right. You should put all of the arguments as JSON in a URL parameter actually named "arg". Likewise, you need to use the "authorization" parameter to send up the access token.
To make the arg value, generate a JSON string of the parameters, encode as UTF-8, then use the “application/x-www-form-urlencoded” rules to encode the value.
Here's an example using curl to upload a local test.txt file to /test.txt in Dropbox, passing authorization and arg as URL parameters:
Why i'm getting this error ? "Error in call to API function "users/get_current_account": Invalid authorization value in URL parameter "authorization": "Bearer%20REDACTED_ACCESS_TOKEN". Expecting "Bearer <oauth2-access-token>"."
@incode4it That value looks right. Can you share your code, or the full/raw request and response? Just be sure to redact the access token itself.
By the way, I redacted your access token from your post, but for the sake of security, you should disable that access token since you posted it publicly. You can do so by revoking access to the app entirely, if the access token is for your account, here:
We love to learn from the educators who use Dropbox. Whether you teach kids, teens, adults or a combination of all three, we want to know what apps and integrations you use with Dropbox to help with teaching. Which of the ones below is your favorite, or most used tool?