I'm working on a APS Revit Design Automation app. I've submitted the work item and it has completed running the add-in bundle and generated an outputFile. However, when it comes to the step of uploading the result to a bucket, it fails.
When I define the output file argument as
var outputFileArgument = new XrefTreeArgument()
{
Url = $"urn:adsk.objects:os.object:{bucketKey}/{resultKey}",
Headers = new()
{
{ "Authorization", "Bearer " + token}
},
Verb = Verb.Put
};
bucketKey - is valid, because the input file works resultKey - I've tried using the same filename as generated from the bundle and a unique filename as well
I'm getting this error:
Uploading 'T:\Aces\Jobs\266b6d812dd04a33b17efd72b054e31e\outputFile.rvt': verb - 'Put', url - 'urn:adsk.objects:os.object:ha.../outputFile.rvt'
[08/11/2025 21:10:55] Error: Unable to upload file to 'urn:adsk.objects:os.object:hat...-designautomation/outputFile.rvt': Fail to upload to OSS: BucketName-'hatso....-designautomation', ObjectKey-'outputFile.rvt', Error-'IDX12709: CanReadToken() returned false. JWT is not well formed.
The token needs to be in JWS or JWE Compact Serialization Format. (JWS): 'EncodedHeader.EncodedPayload.EncodedSignature'. (JWE): 'EncodedProtectedHeader.EncodedEncryptedKey.EncodedInitializationVector.EncodedCiphertext.EncodedAuthenticationTag'.'.
[08/11/2025 21:10:55] Error: Upload failed. Reason = Fail to upload to OSS: BucketName-'hatso47j...eobx-designautomation', ObjectKey-'outputFile.rvt', Error-'IDX12709: CanReadToken() returned false. JWT is not well formed.
I've also tried to use this endpoint https://developer.api.autodesk.com/oss/v2/buckets/{bucketKey}/objects/{resultKey}/signeds3download
To generate the output URL, but this gives me "SignatureDoesNotMatchThe request signature we calculated does not match the signature you provided" error
