# Machine Learning Extractor API Key issue

**URL:** <https://forum.uipath.com/t/machine-learning-extractor-api-key-issue/199092>\
**Category:** Document Understanding\
**Tags:** api, intelligent-ocr, document-understanding, error, activities\
**Created:** [March 3, 2020, 7:30am UTC](https://forum.uipath.com/t/machine-learning-extractor-api-key-issue/199092 "2020-03-03T07:30:39Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![prat](https://avatars.discourse-cdn.com/v4/letter/p/7bcc69/32.png) [@prat](https://forum.uipath.com/u/prat)\
**Post date:** [March 3, 2020, 7:30am UTC](https://forum.uipath.com/t/machine-learning-extractor-api-key-issue/199092/1 "2020-03-03T07:30:39Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![prat](https://avatars.discourse-cdn.com/v4/letter/p/7bcc69/32.png) [@prat](https://forum.uipath.com/u/prat)\
**Post date:** [March 4, 2020, 12:06pm UTC](https://forum.uipath.com/t/machine-learning-extractor-api-key-issue/199092/2 "2020-03-04T12:06:00Z")

</div>

@loginerror, can you please help on this

---

<div class="post-metadata">

**Author:** ![Manish540](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/manish540/32/356167_2.png) [@Manish540](https://forum.uipath.com/u/Manish540)\
**Post date:** [March 4, 2020, 12:31pm UTC](https://forum.uipath.com/t/machine-learning-extractor-api-key-issue/199092/3 "2020-03-04T12:31:52Z")

</div>

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

 ![Api_Key](https://global.discourse-cdn.com/uipath/original/3X/2/1/218cc5b4c7359a7a18f9092f3024a789f056d09b.png) ???..

---

<div class="post-metadata">

**Author:** ![prat](https://avatars.discourse-cdn.com/v4/letter/p/7bcc69/32.png) [@prat](https://forum.uipath.com/u/prat)\
**Post date:** [March 4, 2020, 3:48pm UTC](https://forum.uipath.com/t/machine-learning-extractor-api-key-issue/199092/4 "2020-03-04T15:48:37Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Lahiru.Fernando](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/lahiru.fernando/32/523857_2.png) [@Lahiru.Fernando](https://forum.uipath.com/u/Lahiru.Fernando)\
**Post date:** [March 5, 2020, 5:24am UTC](https://forum.uipath.com/t/machine-learning-extractor-api-key-issue/199092/5 "2020-03-05T05:24:00Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![prat](https://avatars.discourse-cdn.com/v4/letter/p/7bcc69/32.png) [@prat](https://forum.uipath.com/u/prat)\
**Post date:** [March 5, 2020, 6:23am UTC](https://forum.uipath.com/t/machine-learning-extractor-api-key-issue/199092/6 "2020-03-05T06:23:37Z")

</div>

Hi Lehiru,

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

---

<div class="post-metadata">

**Author:** ![mmcruzRPA](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/mmcruzrpa/32/491544_2.png) [@mmcruzRPA](https://forum.uipath.com/u/mmcruzRPA)\
**Post date:** [March 9, 2020, 3:14pm UTC](https://forum.uipath.com/t/machine-learning-extractor-api-key-issue/199092/7 "2020-03-09T15:14:07Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![adrian.vilaseco](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/adrian.vilaseco/32/176697_2.png) [@adrian.vilaseco](https://forum.uipath.com/u/adrian.vilaseco)\
**Post date:** [March 26, 2020, 3:17pm UTC](https://forum.uipath.com/t/machine-learning-extractor-api-key-issue/199092/8 "2020-03-26T15:17:33Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![adrian.vilaseco](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/adrian.vilaseco/32/176697_2.png) [@adrian.vilaseco](https://forum.uipath.com/u/adrian.vilaseco)\
**Post date:** [March 26, 2020, 4:09pm UTC](https://forum.uipath.com/t/machine-learning-extractor-api-key-issue/199092/9 "2020-03-26T16:09:52Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Robert\_Heggio](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/robert_heggio/32/109933_2.png) [@Robert\_Heggio](https://forum.uipath.com/u/Robert_Heggio)\
**Post date:** [May 12, 2020, 10:55pm UTC](https://forum.uipath.com/t/machine-learning-extractor-api-key-issue/199092/10 "2020-05-12T22:55:35Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![j.marton](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/j.marton/32/177284_2.png) [@j.marton](https://forum.uipath.com/u/j.marton)\
**Post date:** [June 24, 2020, 8:53am UTC](https://forum.uipath.com/t/machine-learning-extractor-api-key-issue/199092/12 "2020-06-24T08:53:20Z")

</div>

Please check if You have Enterprise Trial license, use the Enterprice URL:[https://invoices.uipath.com/?edition=enterprise](https://invoices.uipath.com/?edition=enterprise).

---

<div class="post-metadata">

**Author:** ![MartianxSpace](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/martianxspace/32/70047_2.png) [@MartianxSpace](https://forum.uipath.com/u/MartianxSpace)\
**Post date:** [October 13, 2020, 12:01pm UTC](https://forum.uipath.com/t/machine-learning-extractor-api-key-issue/199092/13 "2020-10-13T12:01:31Z")

</div>

You are Awesome 😍 It worked for me

URL:[https://invoices.uipath.com/?edition=enterprise](https://invoices.uipath.com/?edition=enterprise)

---

<div class="post-metadata">

**Author:** ![kchang](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/kchang/32/67961_2.png) [@kchang](https://forum.uipath.com/u/kchang)\
**Post date:** [November 8, 2020, 4:06pm UTC](https://forum.uipath.com/t/machine-learning-extractor-api-key-issue/199092/14 "2020-11-08T16:06:27Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![basil\_aiqmis](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/basil_aiqmis/32/182935_2.png) [@basil\_aiqmis](https://forum.uipath.com/u/basil_aiqmis)\
**Post date:** [November 10, 2020, 2:01am UTC](https://forum.uipath.com/t/machine-learning-extractor-api-key-issue/199092/15 "2020-11-10T02:01:44Z")

</div>

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  
 ![image](https://global.discourse-cdn.com/uipath/original/3X/7/2/720ce04e1f4d1797f4d8fa22a8e9de454bc0d547.png)

---

<div class="post-metadata">

**Author:** ![brian-kl.ng](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/brian-kl.ng/32/177583_2.png) [@brian-kl.ng](https://forum.uipath.com/u/brian-kl.ng)\
**Post date:** [January 14, 2021, 7:25am UTC](https://forum.uipath.com/t/machine-learning-extractor-api-key-issue/199092/16 "2021-01-14T07:25:36Z")

</div>

Hi,

I was on community version but URL: [https://invoices.uipath.com/?edition=community](https://invoices.uipath.com/?edition=community)  
or  
[https://invoices.uipath.com](https://invoices.uipath.com)  
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 ?

---

<div class="post-metadata">

**Author:** ![brian-kl.ng](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/brian-kl.ng/32/177583_2.png) [@brian-kl.ng](https://forum.uipath.com/u/brian-kl.ng)\
**Post date:** [January 14, 2021, 7:30am UTC](https://forum.uipath.com/t/machine-learning-extractor-api-key-issue/199092/17 "2021-01-14T07:30:25Z")

</div>

![image](https://global.discourse-cdn.com/uipath/original/3X/2/1/219324dfeb4b38713d336573a3832e4d0652c36f.png)

---

<div class="post-metadata">

**Author:** ![AndyMenon](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/andymenon/32/464037_2.png) [@AndyMenon](https://forum.uipath.com/u/AndyMenon)\
**Post date:** [January 27, 2021, 2:15am UTC](https://forum.uipath.com/t/machine-learning-extractor-api-key-issue/199092/18 "2021-01-27T02:15:03Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![brian-kl.ng](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/brian-kl.ng/32/177583_2.png) [@brian-kl.ng](https://forum.uipath.com/u/brian-kl.ng)\
**Post date:** [January 27, 2021, 5:54am UTC](https://forum.uipath.com/t/machine-learning-extractor-api-key-issue/199092/19 "2021-01-27T05:54:56Z")

</div>

thanks !

---

<div class="post-metadata">

**Author:** ![mayank.te](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/mayank.te/32/129024_2.png) [@mayank.te](https://forum.uipath.com/u/mayank.te)\
**Post date:** [February 21, 2022, 6:42pm UTC](https://forum.uipath.com/t/machine-learning-extractor-api-key-issue/199092/20 "2022-02-21T18:42:05Z")

</div>

I am trying the same with the updated ML endpoint given in the page : [Public Endpoints](https://docs.uipath.com/document-understanding/docs/public-endpoints)

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

---

<div class="post-metadata">

**Author:** ![sharon.palawandram](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/sharon.palawandram/32/257521_2.png) [@sharon.palawandram](https://forum.uipath.com/u/sharon.palawandram)\
**Post date:** [October 25, 2022, 9:08pm UTC](https://forum.uipath.com/t/machine-learning-extractor-api-key-issue/199092/21 "2022-10-25T21:08:51Z")

</div>

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.

[Next page](https://forum.uipath.com/t/machine-learning-extractor-api-key-issue/199092.md?page=2)
