Closed namack closed 2 weeks ago
It looks like I am able to get the desired functionality using the base_upload
scope. Regardless, it seems like this missing scope (item_upload
) is still a bug in the SDK.
Looks like item_upload
scope is missing from the spec and we heavily rely on it during SDK generation - https://developer.box.com/reference/resources/access-token/#param-restricted_to-scope. I'll let the team know about the issue
Should be fixed by #281 and will be released with the next version of the SDK.
Description of the Issue
Downscoping of a token with the scope
item_upload
causes serialization issues.Downscoping a token using the
base_explorer
scope on a resource works as intended:However, once the
item_upload
scope is added a deserialization error is thrown:Error:
I believe this scope is missing in the
deserializeFileOrFolderScopeScopeField
function.https://github.com/box/box-typescript-sdk-gen/blob/20d347d956db05bc2e87f771dc1cab1308915f59/src/schemas/fileOrFolderScope.generated.ts#L34
Steps to Reproduce
Call the
downscopeToken
function withitem_upload
included in the scope:Expected Behavior
I expect a valid token to be returned to allow the App User to upload files and create folders.
Error Message, Including Stack Trace
Screenshots
Not applicable
Versions Used
Typescript SDK: 1.2.0 Platform: Node Node.js (if applicable): v20.11.0