Curious about A, B, C, and D drives? Learn what they mean and how to use them effectively with Dropbox in this handy guide! - check it out now!
Forum Discussion
ram4444
2 years agoExplorer | Level 4
Service Unavailable 503
https://api.dropbox.com/oauth2/token?grant_type=refresh_token&refresh_token=<REFRESH_TOKEN>&client_id=<MYAPPID>&client_secret=<MYSECRET>
When I http POST to the above URL for refreshing Access ...
- 2 years ago
ram4444 Thanks for following up and sharing that, and apologies for the delay. (It appears your latest message may have initially been caught in a spam filter.)
Anyway, I see your client is sending a "TE" header in the request, but no "Connection" header. According to the specification, the corresponding "Connection" header value is required when setting the "TE" header. I am able to reproduce the error you see when setting "TE" and not "Connection", and I am able to resolve the error by setting both "TE" and "Connection" (specifically, "Connection: TE"). If you are not able to remove the "TE" header your client is setting, you should try to have it set "Connection: TE" as well.
Greg-DB
Dropbox Staff
2 years agoram4444 As Здравко said, your output may not actually be representative of the real request. I tried replicating the request in curl using the header values you supplied, but the call succeeded for me. That may indicate that the output in fact does not sufficiently show what the actual request consists of.
That being the case, you may want to use the technique that Здравко helpfully provided to try to see what the difference is.
By the way, they've been redacted from the post, but I see that you originally included your refresh token, app key, and app secret in your most recent message. Since those were publicly posted for a time though, I suggest revoking the refresh token. You can do so by calling /2/auth/token/revoke using a short-lived access token for that refresh token, which would revoke that refresh token as well as any/all short-lived access tokens for that refresh token. You can use the API v2 Explorer to perform the call. You'd then need to re-authorize the app to get a new refresh token. If the app is in development mode, you can also delete and recreate the app itself from the App Console to invalidate the app key/secret; that would also disable any/all access tokens/refresh tokens for the app as well, and you'd need to update the app to use the new key/secret.
ram4444
2 years agoExplorer | Level 4
Thanks for Greg-DB and Здравко advices. I have located the problem is the Header TE generated from FUEL itself. After putting it to the POSTMAN request I can replicate the status code 503
User-Agent: FUEL
Accept: */*
Accept-Encoding: gzip, deflate, br
Cookie: locale=en; t=RzvutB7WDW79g72wIY13TQgy
Content-Type: text/plain; charset=UTF-8
TE: gzip, deflate; q=0.5
As I still cannot find any way to remove this header from the request of my code, may I know why the server will handle it and cause error (so that it can be simply ignored when receive?)
- Greg-DB2 years ago
Dropbox Staff
ram4444 Thanks for following up and sharing that, and apologies for the delay. (It appears your latest message may have initially been caught in a spam filter.)
Anyway, I see your client is sending a "TE" header in the request, but no "Connection" header. According to the specification, the corresponding "Connection" header value is required when setting the "TE" header. I am able to reproduce the error you see when setting "TE" and not "Connection", and I am able to resolve the error by setting both "TE" and "Connection" (specifically, "Connection: TE"). If you are not able to remove the "TE" header your client is setting, you should try to have it set "Connection: TE" as well.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,955 PostsLatest Activity: 5 minutes ago
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 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!