For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
71 0 1 4

Eikon API Proxy requires authentication.

Hello, could you please help me to bypass the following error?

EikonError: Error code 401 | Client Error: Unauthorized - Eikon API Proxy requires authentication.

Output:

runfile('C:/Anaconda3/Lib/site-packages/eikon/test.py', wdir='C:/Anaconda3/Lib/site-packages/eikon') Error code 401 | Client Error: Unauthorized - Eikon API Proxy requires authentication. Traceback (most recent call last): File "<ipython-input-13-af335af83c7d>", line 1, in <module> runfile('C:/Anaconda3/Lib/site-packages/eikon/test.py', wdir='C:/Anaconda3/Lib/site-packages/eikon') File "C:\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 704, in runfile execfile(filename, namespace) File "C:\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 108, in execfile exec(compile(f.read(), filename, 'exec'), namespace) File "C:/Anaconda3/Lib/site-packages/eikon/test.py", line 10, in <module> ek.get_news_headlines('R:LHAG.DE', date_from='2017-04-05T09:00:00', date_to='2017-04-05T18:00:00') File "C:\Anaconda3\lib\site-packages\eikon\news_request.py", line 120, in get_news_headlines result = eikon.json_requests.send_json_request(News_Headlines_UDF_endpoint, payload, debug=debug) File "C:\Anaconda3\lib\site-packages\eikon\json_requests.py", line 100, in send_json_request raise_for_status(response) File "C:\Anaconda3\lib\site-packages\eikon\json_requests.py", line 191, in raise_for_status raise EikonError(response.status_code, error_msg) EikonError: Error code 401 | Client Error: Unauthorized - Eikon API Proxy requires authentication.

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpythonauthentication
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

@dmitry.sarin could you share the code that you are trying to execute and describe your set up please (Eikon/Eikon Proxy on MacOS/Windows)?

It's Eikon/Windows

I just got the API key and tried the set example provided in the intro section

import eikon as ek

ek.set_app_key('***') ek.get_news_headlines('R:LHAG.DE', date_from='2017-04-05T09:00:00', date_to='2017-04-05T18:00:00')

@dmitry.sarin could you please restart your Eikon and try again? I had a look at your key, it works fine.

Show more comments

@Zhenya Kovalyov I am getting the same error, even after restarting Eikon. Tried with a new App key, still error. It was working fine a couple of days ago. The code I run (on windows) is:

import eikon as ek
ek.set_app_key(my app key) 
df = ek.get_timeseries(["MSFT.O"],start_date="2016-01-01",  end_date="2016-01-10") 

I get

Error code 401 | Client Error: Eikon API Proxy requires authentication

1 Answer

Upvote
Accepted
4.6k 26 7 22

@dmitry.sarin Eikon seemed to have lost the session with the platform, and a simple restart will fix this.

If this continues happening, let us know.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Restarting Eikon didn't work for me. Restarting my pc did though...

Is there anyway to refresh the session in order to avoid restartng the PC or EIKON?

No, there isn't. See this thread for the explanation of the mechanism of the issue.

Click below to post an Idea Post Idea