Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
emretezisci
3 years agoExplorer | Level 3
"error_description": "missing required field \"grant_type\""
I am trying to get a sl access token with my refresh token but it gives this error. Any idea why?
Input:
{
"body": {
"grant_type": "",
"refresh_token": "<token>"
},
"contentType": "application/json",
"followRedirect": false,
"headers": [
{
"key": "Authorization",
"value": "Basic <key>"
}
],
"method": "POST",
"timeoutSeconds": 5,
"url": "https://api.dropbox.com/oauth2/token"
}
Output:
{
"error": {
"canCatch": true,
"canRetry": true,
"cause": "invalid response status code",
"description": "The HTTP request failed",
"error": "Flow.Step.HTTPRequest.Failed",
"metadata": {
"body": {
"error": "unsupported_grant_type",
"error_description": "missing required field \"grant_type\""
},
"headers": {
"Accept-Encoding": [
"identity,gzip"
],
"Content-Length": [
"97"
],
"Content-Security-Policy": [
"sandbox allow-forms allow-scripts"
],
"Content-Type": [
"application/json"
],
"Date": [
"Tue, 07 Nov 2023 11:58:41 GMT"
],
"Server": [
"envoy"
],
"X-Dropbox-Request-Id": [
"6857e5f3655547459b471405aef54adc"
],
"X-Dropbox-Response-Origin": [
"far_remote"
]
},
"statusCode": 400,
"statusText": "Bad Request"
}
}
}
13 Replies
- trailtech10 months agoNew member | Level 1
Unfortunately, they don't have the API to print the HTTP request. So, you suspect the payload isn't constructed properly, specifically on the "grant_type" field, right?
- DB-Des10 months ago
Dropbox Community Moderator
I suspect that is most likely the case. However the request is being formed, it is not adding the "grant_type" field in the body of the request.
- trailtech10 months agoNew member | Level 1
Yes, it always mentions missing "grant_type" when requesting the token. This is pretty weird because I use it for uploading requests without a problem. Thank you anyway.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If 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, Facebook or Instagram.
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!