dropbox / dropbox/dropbox-sdk-dotnet

Thumbnail APIs broken in SDK 7.2.0 - unexpected key 'quality'

Open
#437 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
C#
Stars
347
Forks
439
Avg merge
4m
Merged PRs (30d)
9

Description

**Describe the bug**

None of the thumbnail APIs work in SDK 7.2.0. They all return `unexpected key 'quality'`.

In SDK 7.0.0, client.Files.GetThumbnailAsync(...) works great.

In SDK 7.2.0, client.Files.GetThumbnailAsync(...) and client.Files.GetThumbnailV2Async(...) always return HTTP 500 ("Bad Request") with this type of error message: `Error in call to API function "files/get_thumbnail": unexpected key 'quality'`.

The thumbnail "batch" APIs are also broken with the same error message.

With GetThumbnailV2Async(...), the ThumbnailV2Arg class has a quality parameter in the constructor. But when null is passed in, quality defaults to `ThumbnailQuality.Quality80.Instance`. There doesn't seem to be a way to completely eliminate/remove quality from the request.

**To Reproduce**
Install SDK 7.2.0 and invoke any of the thumbnail APIs.

**Expected Behavior**
Returns HTTP 200 with thumbnail(s)

**Actual Behavior**
Returns HTTP 500 with error message

**Screenshots**
N/A

**Versions**
* What version of the SDK are you using?
7.2.0

* What version of the language are you using?
Latest

* What platform are you using? (if applicable)
Windows 11
.NET 8.0.418
.NET Standard 2.0 project

**Additional context**

**SUCCESS - Sample HTTP Request/Response for `get_thumbnail` in SDK 7.0.0**

[LoggingHttpMessageHandler:SendAsync] Request: POST https://content.dropboxapi.com/2/files/get_thumbnail

[LoggingHttpMessageHandler:SendAsync] Request Headers: Authorization: Bearer sl.u.AGsJrYci3rgkI8w...VeG9oc0-04r5StfwS6O2LfY
User-Agent: OfficialDropboxDotNetSDKv2/7.0.0.0
Dropbox-API-Arg: {"path":"/Company6595/Active/Job1111383/JobPhotos/Photo_D20211014091115_J1111383_S57748_C6595.jpg","format":{".tag":"jpeg"},"size":{".tag":"w64h64"},"mode":{".tag":"strict"}}

[LoggingHttpMessageHandler:SendAsync] Request Body:

[LoggingHttpMessageHandler:SendAsync] Response Status: 200 OK

[LoggingHttpMessageHandler:SendAsync] Response Headers: X-Content-Type-Options: nosniff
Pragma: no-cache
Content-Security-Policy: sandbox
X-Frame-Options: sameorigin
X-Webkit-Csp: sandbox
X-Content-Security-Policy: sandbox
Original-Content-Length: 1143
Dropbox-Api-Result: {"client_modified":"2021-10-14T13:11:34Z","content_hash":"cee1549c18984259bee761abae4faf5f7fa085136fa4755ce61b62636cad88c3","id":"id:-HiV6V_TOqEAAAAAAAAioA","is_downloadable":true,"name":"Photo_D20211014091115_J1111383_S57748_C6595.jpg","path_display":"/Company6595/Active/Job1111383/JobPhotos/Photo_D20211014091115_J1111383_S57748_C6595.jpg","path_lower":"/company6595/active/job1111383/jobphotos/photo_d20211014091115_j1111383_s57748_c6595.jpg","property_groups":[],"rev":"5ce4fd16c2f300b902508","server_modified":"2021-10-14T13:11:34Z","size":2325891}
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
X-Robots-Tag: noindex, nofollow, noimageindex
X-Dropbox-Response-Origin: far_remote
X-Dropbox-Request-Id: 415a2b80299345d8835ec37e6aa4af82
Accept-Ranges: bytes
Cache-Control: no-cache
Date: Sat, 12 Sep 2026 01:48:51 GMT
Server: envoy

[LoggingHttpMessageHandler:SendAsync] Response Body: ...

**ERROR - Sample HTTP Request/Response logs for `get_thumbnail` in SDK 7.2.0**

[LoggingHttpMessageHandler:SendAsync] Request: POST https://content.dropboxapi.com/2/files/get_thumbnail

[LoggingHttpMessageHandler:SendAsync] Request Headers: Authorization: Bearer sl.u.AGtBpEcaVTQu...HnTLwlTSFMou4EqsjnpJw
User-Agent: OfficialDropboxDotNetSDKv2/7.2.0.0
Dropbox-API-Arg: {"path":"/Company6595/Active/Job1111383/JobPhotos/Photo_D20211014091115_J1111383_S57748_C6595.jpg","format":{".tag":"jpeg"},"size":{".tag":"w64h64"},"mode":{".tag":"strict"},"quality":{".tag":"quality_80"}}

[LoggingHttpMessageHandler:SendAsync] Request Body:

[LoggingHttpMessageHandler:SendAsync] Response Status: 400 BadRequest

[LoggingHttpMessageHandler:SendAsync] Response Headers: X-Content-Type-Options: nosniff
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
X-Robots-Tag: noindex, nofollow, noimageindex
X-Dropbox-Response-Origin: far_remote
X-Dropbox-Request-Id: 7cb98c7533f8478295982a8a6aa4b1d1
Cache-Control: no-cache
Date: Sat, 12 Sep 2026 01:58:41 GMT
Server: envoy

[LoggingHttpMessageHandler:SendAsync] Response Body: Error in call to API function "files/get_thumbnail": unexpected key 'quality'

**ERROR - Sample HTTP Request/Response logs for `get_thumbnail_v2` in SDK 7.2.0**

[LoggingHttpMessageHandler:SendAsync] Request: POST https://content.dropboxapi.com/2/files/get_thumbnail_v2

[LoggingHttpMessageHandler:SendAsync] Request Headers: Authorization: Bearer sl.u.AGssCoVAQ8zQn...ElGB2tDiIPA
User-Agent: OfficialDropboxDotNetSDKv2/7.2.0.0
Dropbox-API-Arg: {"resource":{".tag":"path","path":"/Company6595/Active/Job1111383/JobPhotos/Photo_D20211014091115_J1111383_S57748_C6595.jpg"},"format":{".tag":"jpeg"},"size":{".tag":"w64h64"},"mode":{".tag":"strict"},"quality":{".tag":"quality_80"}}

[LoggingHttpMessageHandler:SendAsync] Request Body:

[LoggingHttpMessageHandler:SendAsync] Response Status: 400 BadRequest

[LoggingHttpMessageHandler:SendAsync] Response Headers: X-Content-Type-Options: nosniff
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
X-Robots-Tag: noindex, nofollow, noimageindex
X-Dropbox-Response-Origin: far_remote
X-Dropbox-Request-Id: 0e4044939b404064828078596aa4b282
Cache-Control: no-cache
Date: Sat, 12 Sep 2026 02:01:38 GMT
Server: envoy

[LoggingHttpMessageHandler:SendAsync] Response Body: Error in call to API function "files/get_thumbnail_v2": unexpected key 'quality'

Contributor guide

Open the contributing guide

Research direction

Start with the ThumbnailV2Arg class and the GetThumbnailAsync, GetThumbnailV2Async, and thumbnail batch API entry points. Reproduce the request on SDK 7.2.0 and compare its serialized Dropbox-API-Arg with the successful SDK 7.0.0 example, focusing on the unexpected quality field. Done means all thumbnail APIs omit unsupported quality data when appropriate and return successful responses, with regression coverage for the request shape.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.