We are using the .Net SDK client vs 6.14. We primarily use the Files.GetMetadataSync and Files.SaveUrlAsync api calls. We call the API with a variety of long-lived accessTokens and refreshTokens depending on when our customer initiated their Dropbox connection with us. On a number of recent customers who we setup with refreshTokens, we receive a 400 BadRequest HttpRequestException on every API call we make. We configure the DropboxClient with the refreshToken and our AppKey and AppSecret, leaving the accessToken handling up to the DropboxClient. From the returned stack trace, we see the 400 BadRequest is NOT coming in regards to our API call, but rather from the internal oauth calls the library is making to get an AccessToken.
Can you tell us why we are getting the 400 BadRequest from internal oauth calls and what we can do to rectify it?
Here is the stack trace:
at HttpResponseMessage System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
at async Task<bool> Dropbox.Api.DropboxRequestHandler.RefreshAccessToken(string[] scopeList)
at async Task<bool> Dropbox.Api.DropboxRequestHandler.CheckAndRefreshAccessToken()
at async Task<Result> Dropbox.Api.DropboxRequestHandler.RequestJsonStringWithRetry(string host, string routeName, string auth, RouteStyle routeStyle, string requestArg, Stream body)
at async Task<TResponse> Dropbox.Api.DropboxRequestHandler.Dropbox.Api.Stone.ITransport.SendRpcRequestAsync<TRequest, TResponse, TError>(TRequest request, string host, string route, string auth, IEncoder<TRequest> requestEncoder, IDecoder<TResponse> responseDecoder, IDecoder<TError> errorDecoder)
at async Task<SaveUrlResponse>