Machine Learning Extractor API Key issue

I am using API key which is under Document Understanding. Still I am getting below error

Source: Machine learning extractor

Message: Request is unauthorized. Please make sure that a correct API Key was provided.

Exception Type: UiPath.DocumentUnderstanding.ML.Activities.Exceptions.MLRequestException

An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
UiPath.DocumentUnderstanding.ML.Activities.Exceptions.MLRequestException: Request is unauthorized. Please make sure that a correct API Key was provided. ----> System.Net.Http.HttpRequestException: Response status code does not indicate success: 401 (UNAUTHORIZED).
at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
at UiPath.DocumentUnderstanding.ML.Activities.Services.MLClient.d__6`1.MoveNext()
— End of inner ExceptionDetail stack trace —
at UiPath.DocumentUnderstanding.ML.Activities.MachineLearningExtractor.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

1 Like

@loginerror, can you please help on this

1 Like

Whether you are copying the API key from the Licenses tab as shown below,


1 Like

Yes Manish, I tried both API keys, which are under Computer Vision and Document Understanding.
I generated new keys and tried as well.

Hi @prat
DId you try upgrading the activities to the latest version and then using the new API key that is under Document understanding section?

Let know your findings.

1 Like

Hi Lehiru,

Thank you. I tried in this way but still getting the same error

Are you typing the API in the API field and the url in the url field of the activity? Verify that

1 Like

Any help on this? I’m getting the same error.

After opening a ticket, they helped me. It was the endpoint:

You have to add “?edition=community” or “?edition=enterprise” to the endpoint depending the version you have.

In my case I was using Enterprise so that was the fail. If you don’t specifiy one by default “Community” is assumed by the endpoint.


you mean adding this to the key or URL endpoint?
BR. Robert

Please check if You have Enterprise Trial license, use the Enterprice URL:


You are Awesome :heart_eyes: It worked for me


This worked for me as well. Thank you all in the community for sharing.

I Can’t access that webpage. that link showing

{"info":"Can't find JSON in data","reason":"MICROSERVICE_BAD_DATA"}

Why these type of error occurs, I’m Config that API Correctly But the issue still occur


I was on community version but URL:
It didnt work on me even though i tried to regenerate a new key.
it showed as “An error occurred while retrieving capabilities from the server. Please check the logs for more details”

Any clue ?


Check if the End point has been recently changed by UiPath. There is a documentation page that informs users of the latest end point

thanks !

I am trying the same with the updated ML endpoint given in the page : Public Endpoints

But getting the same error. What could be possible reason of failure ?

Please check your API key if its mentioned as a string and in correct form. Make sure your ML skill is connected, you will need to make your skill public. If both of these work, you will be able to call the API properly.