Upgrade from Eikon -> Workspace. Learn about programming differences.

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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
33 1 1 4

Eikon Python API 403 response

I have been using Eikon Python API well, but suddenly all my Eikon commands response as follow with failure: requests.exceptions.HTTPError: Response [403], and rebooting the machine doesnt help. However, the Eikon client works normally and answers to all visual usages.

What would be the problem? What is strange is , the same python program can be run yesterday smoothly, and today it fails with this 403 error, and I have not changed any settings.

eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-apierror-403
icon clock
10 |1500

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

Upvotes
Accepted
39.4k 77 11 27

@lbnxxxx
I'm afraid I don't see you having generated any keys using App Key Generator app. Could you please double check and confirm that the key you use was generated using App Key Generator app? Please pay attention to the exact app name, as there is an app with a similar name, which was previously used to generate app IDs. The app IDs generated using delisted Application ID Generator app are no longer valid. You need to generate an app key using the App Key Generator app. It might be helpful to see the screenshot of the app you need to use, which is available in the Quick Start Guide for Eikon Data APIs:
https://developers.thomsonreuters.com/eikon-apis/eikon-data-apis/quick-start#create-app-key

icon clock
10 |1500

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

Upvotes
33 1 1 4

I think I can supplement information for my situation. The details are in fact simple:-

i am using a python cygwin installation on the same machine and try to run the python. previously it worked. then suddenly today it comes with this error for any eikon retrieval commands.

>> import eikon as ek

>> ek.set_app_id("xxxxx")

>> ek.get_news_headlines("R:MSFT.O",2)

then it reports file news_request.py line 106 the send_json_request() line

then file json_requests, line 92 in send _json_request

it raises requests.HTTPError(str(response),response=response)

requests.exceptions.HTTPError: <Response [403]>

icon clock
10 |1500

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

Upvotes
4.3k 2 4 5

Could you detail the Eikon Python API version ?

You should update for the 0.1.13 version that give you more details on exception root cause.

icon clock
10 |1500

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

Upvotes
33 1 1 4

Thank you for your advice Pierre. I use pip to update the eikon module and it does tell me more.

raise EikonError(response.status_code, error_msg)
eikon.eikonError.EikonError: Error code 403 | Client Error: Forbidden - {"ErrorCode":1401,"ErrorMessage":"Application id XXXXXXXXXXXXXXXXX is invalid"}

I am using the python api to do some big data analysis for research purpose, may be it triggered something on this app id for using the eikon module. However, I have tried creating a new App id and the same error happens again. I think some status of my account has been changed due to my previous function call and banned my API access?

icon clock
10 |1500

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

Upvotes
4.3k 2 4 5

OK, you just have to renew your Application Key because authentication system was updated.

To do this, you have to run Eikon Desktop and open App Key Generator.

icon clock
10 |1500

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

Upvotes
33 1 1 4

I have tried to create new app id using the app key generator, and then use the new app id to run eikon python api, but the same error occurs.

Exactly the same error.

Should I contact support for account assistance?

icon clock
10 |1500

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

Upvotes
4.3k 2 4 5

Really strange.
Could you check in log files the API proxy version ?

By default, you'll find it in C:\ProgramData\Thomson Reuters\Eikon Data\Logs\TRD\Eikon.<yyyymmdd>.<hhmmss>.p<pid> directory,
in the SxS.<yyyymmdd>.<hhmmss>.p<pid>.txt file,
search for "APIPROXY|1|INFO] [ApiRoute]Processing request on path '/' with this configuration: {"currentVersion"" to find the version.

icon clock
10 |1500

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

Upvotes
33 1 1 4

Hello Pierre,

I have looked into the SxS files, all of them are similar and are very short, with content like this :-

start node

Arg: C:\Program Files\Thomson Reuters\Eikon\Y\Bin\Eikonbox.exe C:\Users\*User Name*\AppData\Local\Thomson Reuters\Eikon User\Cache\LibraryCache\Apps\THOMSONREUTERS.EIKON.DESKTOPSXSSVC\1.1.0.28\index.js -TraceLevel=-1 

And I have not found "APIProxy" line.

Should I consider reinstalling my Eikon Client?

icon clock
10 |1500

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

Upvotes
33 1 1 4

To supplement, My Eikon is Desktop 4.0.43 (4.0.43166)

OS is Win7 SP1, and it is windows-updated. It does not have MSOffice with it.

Since you seems to be suggesting a debug route, I try to run the test and view log within the Eikon Client. When I run the python script, the Eikon log generate these.

[2018-06-23 13:14:46.584|1670|A_PROXYADDON  |2|INFO ]Connection Id [871|51331]. EikonProxy.forwardDirectHttps, Received status code: 200
[2018-06-23 13:14:46.101|1670|A_PROXYADDON  |2|INFO ]Connection Id [871|51331]. EikonProxy.httpHandler POST http://apac1.apps.cp.thomsonreuters.com/Apps/UDF/MSF HTTP/1.1

Currently I have no much idea on how to continue the debug. Any idea would be appreciated.

icon clock
10 |1500

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

Upvotes
5 1 2 5

Hi, I've been using Eikon for almost a month now, and now the same error occurred.

I changed the ID, but didn't help.

Did you find solution to this? @lbnxxxx

If you do, please, share.

Thanks!

Oh, just noticed how fresh this post is.

icon clock
10 |1500

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

Upvotes
33 1 1 4

Hi @mtinatin, I probably need to solve this during weekend. see if we have the luck :)

icon clock
10 |1500

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

Upvotes
33 1 1 4

I have tried reinstall the Eikon client and it doesnt help. The system test shows 3 alerts, but no warning and no failed. I believe they are not important since I have used the Eikon Python successfully without these, and I do not use MSOffice and VBasic :-

1. Missing KB3033929 updates

2. No MSOffice

3. VBasic not installed

I have looked into the Log Viewer, after my python headlines requests, I have received the following log lines, it seems they are related to query, but it didnt show much information regarding the error except the status code for request [200] line, which I dont know what TR server means by that. There is a heartbeat request mixed in the log, but I think it is not related to my python request. Overall, the python seems to have been send to TR server successfully, just that a [200] response is returned and my requests seems to be refused by the server. So on our side, it seems I can do no more think to rescue the situation, ... probably until we know about the meaning of the [200] response?

Here is the Log generated at the exact moment of my python requests. But the impression is that my python requests have been passed to the server successfully :-

[2018-06-24 11:13:13.411|1700|SD_FDM_MISC   |2|INFO ]ThreadPoolImp::dispatchRequest: Finished request    (0x5c37f80): New available thread, no more requests to process. Processing requests: 0. Queued requests: 0
[2018-06-24 11:13:13.411|1700|SD_FDM_MISC   |2|INFO ]ThreadPoolImp::_ThreadProc: request processed: (0x5c37f80)
[2018-06-24 11:13:13.411|1700|SD_FDM_MISC   |2|INFO ](0x5c37f80) Request total time: 0:1.560
[2018-06-24 11:13:13.411|1700|SD_FDM_MISC   |2|INFO ](0x5c37f80) ----Async HTTP ENDED (https://apac1.heartbeat.cp.thomsonreuters.com/heartbeat_sappoll?sapversion=1529543379)
		scheme(2) cur(0) downloaded(161) status(200)

[2018-06-24 11:13:13.411|1700|SD_FDM_ASYNCDF|2|INFO ](0x5c37f80) AsyncDownloadFile::asyncHTTP2Done
[2018-06-24 11:13:13.395|0F0C|SD_FDM_ASYNCDF|2|INFO ](0x5c37f80) ThreadResyncCall(0x3e1fb8) asyncHTTP2Done (0)(161)
[2018-06-24 11:13:13.395|0F0C|SD_RSSO       |2|INFO ](0x3b2948) - performHeartbeatRequest - HB for [ONLINE_MODE]. Launch next heartbeat request Event: (0x562) in (300000) millisecond.
[2018-06-24 11:13:13.395|0F0C|SD_RSSO       |2|INFO ](0x3c4b80) - fireConnectionEvent - Fired HeartbeatStatus: [SSO_Heartbeat_Refreshed] with message: 'Heartbeat Session Refreshed'
[2018-06-24 11:13:13.395|0F0C|SD_RSSO       |2|INFO ]setConnectionStatus - Set RDE_SSO_CONNECTION_STATUS = 'ONLINE'
[2018-06-24 11:13:13.395|0F0C|SD_RSSO       |2|INFO ](0x3c4b80) - OnHeartbeatValidation - requestStatus for validation is [REQUEST_OK].
[2018-06-24 11:13:13.395|0F0C|SD_RSSO       |2|INFO ](0x3b2948) - CSingleSignOnImpl::OnRecvHeartbeat got heartbeat [HB_OK] from Home site
[2018-06-24 11:13:13.395|0F0C|SD_RSSO       |2|INFO ](0x5db5b60) - HeartbeatManager::GetHeartbeatResponse heartbeat is in [JSON] format
[2018-06-24 11:13:13.395|0F0C|SD_RSSO       |2|INFO ](0x5db5b60) - performOpsConsoleReport - Heartbeat Response time: (1544) millisecond.
[2018-06-24 11:13:13.395|0F0C|SD_FDM_ASYNCDF|2|INFO ](0x5c37f80) ThreadResyncCall(0x3e1fb8)  refCount(2) cancel(0) http(1) threadSafe(1)
		(Async HTTP)(https://apac1.heartbeat.cp.thomsonreuters.com/heartbeat_sappoll?sapversion=1529543379)

[2018-06-24 11:13:13.395|1700|SD_FDM_MISC   |2|INFO ](0x5c37f80) Status code for request [200]
[2018-06-24 11:13:13.395|1700|SD_FDM_MISC   |2|INFO ](0x5c37f80) HttpSendRequestW done, result [1], SSL flag [0]
[2018-06-24 11:13:11.851|1700|SD_FDM_MISC   |2|INFO ](0x5c37f80) Request Processing to Sending Time: 0:0.000
[2018-06-24 11:13:11.851|1700|SD_FDM_MISC   |2|INFO ]isTrustedAccessPoint:: hostname(https://apac1.heartbeat.cp.thomsonreuters.com) not found into access point trusted list
[2018-06-24 11:13:11.851|1700|SD_FDM_MISC   |2|INFO ](0x5c37f80) Request Processing to Connecting Time: 0:0.000
[2018-06-24 11:13:11.851|1700|SD_FDM_MISC   |2|INFO ](0x5c37f80) Async HTTP (https://apac1.heartbeat.cp.thomsonreuters.com/heartbeat_sappoll?sapversion=1529543379)
[2018-06-24 11:13:11.851|1700|SD_FDM_MISC   |2|INFO ]WorkerThread::Init: m_bInitialized(1) bSessionParametersChanged(0) bProxyAgentEnabled(0)
[2018-06-24 11:13:11.851|1700|SD_FDM_MISC   |2|INFO ](0x5c37f80) Request Creation to Processing Time: 0:0.000
[2018-06-24 11:13:11.851|1700|SD_FDM_MISC   |2|INFO ](0x5c37f80) Do Request
[2018-06-24 11:13:11.851|1700|SD_FDM_MISC   |2|INFO ]_ThreadProc Pop from queue (0x5c37f80) (0) pending with 0 prio 0
[2018-06-24 11:13:11.851|0F0C|SD_RSSO       |2|INFO ](0x5db5b60) - heartbeatRefreshTimerProc - Event: (0xaf4) Heartbeat refresh launched at 06/24/2018 11:13:11
[2018-06-24 11:13:11.851|0F0C|SD_FDM_MISC   |2|INFO ]ThreadPoolImp::dispatchRequest: Dispatching request (0x5c37f80): Processing requests: 1. Queued requests: 0
[2018-06-24 11:13:11.851|0F0C|SD_FDM_MISC   |2|INFO ]ThreadPoolImp::dispatchRequest: New request         (0x5c37f80): threads available. Starting new request.
[2018-06-24 11:13:11.851|0F0C|SD_FDM_MISC   |2|INFO ]ThreadPoolImp::Request url(https://apac1.heartbeat.cp.thomsonreuters.com/heartbeat_sappoll?sapversion=1529543379) treated with priority (0)
[2018-06-24 11:13:11.851|0F0C|SD_FDM_ASYNCDF|2|INFO ](0x5c37f80) AsyncDownloadFile::openHttp Call (0x3e1fb8) (https://apac1.heartbeat.cp.thomsonreuters.com/heartbeat_sappoll?sapversion=1529543379)
[2018-06-24 11:13:11.851|0F0C|SD_FDM_MISC   |2|INFO ](0x5c37f80)Create Request for (https://apac1.heartbeat.cp.thomsonreuters.com/heartbeat_sappoll?sapversion=1529543379) with header(0x3e1fd0), cache(0x3e1fd8), proxy(0x3e1fe0), default priority(0)
[2018-06-24 11:13:11.851|0F0C|SD_FDM_MISC   |2|INFO ]RequestPriority::RequestPriority set default priority level to FDM_REQUEST_NORMAL_PRIO
[2018-06-24 11:13:11.851|0F0C|SD_FDM_MISC   |2|INFO ]RequestPriority::RequestPriority set default priority mode to FDM_PRIORITY_MODE_AS_TRIGGER
[2018-06-24 11:13:11.851|0F0C|SD_FDM_ASYNCDF|2|INFO ]AsyncDownloadFile(0x3e1fb8) Constructor
[2018-06-24 11:13:11.851|0F0C|SD_FDM_MISC   |2|INFO ](0x5c37f80)Delete Request (https://apac1.heartbeat.cp.thomsonreuters.com/heartbeat_sappoll?sapversion=1529543379)
[2018-06-24 11:13:11.851|0F0C|SD_FDM_ASYNCDF|2|INFO ](0x5c37f80) AsyncDownloadFile(0x3e1fb8) Destructor refCount(0) cancel(1) http(1) threadSafe(1)
		(Async HTTP)(https://apac1.heartbeat.cp.thomsonreuters.com/heartbeat_sappoll?sapversion=1529543379)

[2018-06-24 11:13:11.851|0F0C|SD_FDM_ASYNCDF|2|INFO ](0x5c37f80) AsyncDownloadFile::cancel
[2018-06-24 11:13:11.851|0F0C|SD_RSSO       |2|INFO ](0x5db5b60) - heartbeatRefreshTimerProc - Event: (0) Heartbeat refresh (try 0 of total 7) for HeartbeatUrl : https://apac1.heartbeat.cp.thomsonreuters.com/heartbeat_sappoll?sapversion=1529543379

So I still have no clues.

icon clock
10 |1500

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

Upvotes
104 8 10 13

I'm also getting HTTP errors in my R script which had been using the Eikon API interface for months. Regenerating the app key didn't help. Something seems to have changed in the last week, would be glad if someone at Reuters looked at this.

icon clock
10 |1500

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

@claudiu
If you're using the same Eikon account as the one associated with the email address you used to register on this portal, then your Eikon account is currently inactive. I'm afraid I cannot tell you why it is inactive. If you believe it should be active, please reach out to your Thomson Reuters account manager.

No, it's not the same Eikon account, my Eikon account is active, I can forward it to you if it helps you debug, send me a private message. I think this is not a user related problem, see my other thread on HTTP error, it seems I'm not the only one having recent problems.

Upvotes
33 1 1 4

I have tested and debugged the python API for several days, and it didnt go thru. The following error is still happening. I have tried reinstalling and resetting network config. While every other thing stay working, only the Eikon Python API does not work... could someone help?

raise EikonError(response.status_code, error_msg)
eikon.eikonError.EikonError: Error code 403 | Client Error: Forbidden - {"ErrorCode":1401,"ErrorMessage":"Application id XXXXXXXXXXXXXXXXX is invalid"}
icon clock
10 |1500

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

Upvotes
33 1 1 4

@Alex Putkov. Just saw your post and shall try the App Key Generator. I have been using the App ID Generator to create the key string. I shall tell you the result very shortly.

icon clock
10 |1500

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

Upvote
33 1 1 4

@Alex Putkov.

I found that App Key Generator app, and it is asking me to input App Name and App ID fields. I suppose they are from the App ID Generator? I copied them onto the App Key Generator and click "Generate a new API Key", there is a red error line coming up "Server error: AAA/Identity/CreateApplication: Response status code does not indicate success : 400 Bad requests"

On the other hand, I have look at the link you supplied me . In fact I have tried using the App ID generator and then put the output string into ek.set_app_id(), and it does work and I thought I was using it correctly. So you mean I should use the App Key generator instead? Could you tell me how to use that? thanks

icon clock
10 |1500

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

Upvote
33 1 1 4

@Alex Putkov.

It seems I managed to generate an ID from the App Key Generator by typing an ID of my choice into the field. Now I got a new API key and using that at the ek.set_app_ip(), it does work now!

thanks for the help and the past week has really been wasted by this simple misunderstanding and confusion, between "API Key Generator" and "Application ID Generator". Thanks again!

icon clock
10 |1500

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

Upvotes
1 1 1 3

Hi, I am experiencing the same problem, since yesterday my API is generating the 403 error

icon clock
10 |1500

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

@joris
Have you generated the app key using App Key Generator?

Upvotes
33 1 1 4

I suggest TR to update the Eikon Python API documentation and provide a pdf version of it for developer. The current content is not consistent with the current change from App ID to App Key. This lead to this massive confusion in the API community and the sparks of many thread about this issue. Our team , for example, have wasted a week due to this uninformed change.

icon clock
10 |1500

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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