-1

as the title suggests i'm using Autodesk API (C#) to upload objects in AWS buckets.

For some reason sometimes i obtain the following Exception:

System.AggregateException: One or more errors occurred. (Error calling UploadChunk: {"developerMessage":"ACM check failed, user or calling service does not have access to perform this operation","userMessage":"","errorCode":"AUTH-012","more info":"https://developer.api.autodesk.com/documentation/v1/errors/AUTH-012"})
 ---> Autodesk.Forge.Client.ApiException: Error calling UploadChunk: {"developerMessage":"ACM check failed, user or calling service does not have access to perform this operation","userMessage":"","errorCode":"AUTH-012","more info":"https://developer.api.autodesk.com/documentation/v1/errors/AUTH-012"}
   at Autodesk.Forge.ObjectsApi.UploadChunkAsyncWithHttpInfo(String bucketKey, String objectName, Nullable`1 contentLength, String contentRange, String sessionId, Stream body, String contentDisposition, String ifMatch, String contentType)
   at Autodesk.Forge.ObjectsApi.UploadChunkAsync(String bucketKey, String objectName, Nullable`1 contentLength, String contentRange, String sessionId, Stream body, String contentDisposition, String ifMatch, String contentType)

I tried to replicate the error but i get it only randomly. I also implemented a retry policy to call the API in case of that exception but the result doesn't change, even the next calls return the Exception.

I'm sure that credentials and info are correct, they are working with other uploads.

Is it possitble that the token auth is expired and i've to wait more than 2 seconds (actual timesleep set by me) to receive new token for AWS bucket through Autodesk API Objects?

1 Answer 1

1

The error your are getting AUTH-012: The Authorization header is missing or invalid. to me indicates that most likely your token is expiring during use.

Does your application follow the "three-legged authentication/authorization" workflow described in the AutoDesk documentation, where it's also described when/how to refresh the token once expired

Btw you are using v1 of the API which has been deprecated since April 2024

Sign up to request clarification or add additional context in comments.

3 Comments

Hello jitter, thanks for your answer. We are using Autodesk.Forge.Core dll and we can't use 3legged because we can't show any UI. I confirm we are using 2legged and v2 endopoint for the token, i guess the error is a typo or idk
I guess the error is something returned from AWS Bucket while uploading objects/chunks. Is there any other endpoint apart developer.api.autodesk.com/oss/v2/buckets/idbucket/objects/…?
I might need to investigate this further in a call. Please send me a message so we can schedule one: linkedin.com/in/jpornelas

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.