Hi I am new to Eikon API. I used the App Key Generator to get the key and tried the set_app_key but got the 403 error. My python eikon version is 1.1.12 and below is the error msg.
# eikon API connection
import eikon as ek
_EIKON_API= 'b603fcaa78a548408cb085e13d8331a955c63fa3'
ek.set_log_level(1)
ek.set_app_key(_EIKON_API)
ek.get_timeseries('AAPL.O', interval='daily')
2021-09-11 11:30:02,161 P[36228] [MainThread 30864] Send GET request to http://127.0.0.1:9060/api/status to detect API Proxy...
2021-09-11 11:30:02,161 P[36228] [MainThread 30864] Request to http://127.0.0.1:9060/api/status
headers = {'x-tr-applicationid': 'b603fcaa78a548408cb085e13d8331a955c63fa3'}
params = None
2021-09-11 11:30:02,193 P[36228] [MainThread 30864] HTTP request response 200: {"statusCode":"ST_PROXY_READY","version":"2.9.0"}
2021-09-11 11:30:02,193 P[36228] [MainThread 30864] Checking port 9060 response : 200 - {"statusCode":"ST_PROXY_READY","version":"2.9.0"}
2021-09-11 11:30:02,193 P[36228] [MainThread 30864] Port 9060 was retrieved from .portInUse file
2021-09-11 11:30:02,193 P[36228] [MainThread 30864] Try to handshake on url http://127.0.0.1:9060/api/handshake...
2021-09-11 11:30:02,195 P[36228] [MainThread 30864] Request to http://127.0.0.1:9060/api/handshake
headers = {'Content-Type': 'application/json', 'x-tr-applicationid': 'b603fcaa78a548408cb085e13d8331a955c63fa3'}
params = None
2021-09-11 11:30:02,430 P[36228] [MainThread 30864] HTTP request response 400: Application key is not valid.
2021-09-11 11:30:02,431 P[36228] [MainThread 30864] Response : 400 - Application key is not valid.
2021-09-11 11:30:02,431 P[36228] [MainThread 30864] Response 400 on handshake port 9060 : Application key is not valid.
2021-09-11 11:30:02,431 P[36228] [MainThread 30864] Application ID: b603fcaa78a548408cb085e13d8331a955c63fa3
2021-09-11 11:30:02,431 P[36228] [MainThread 30864] Init a Desktop session with new app_key
2021-09-11 11:30:02,431 P[36228] [MainThread 30864] Port 9060 on local proxy was detected
2021-09-11 11:30:02,431 P[36228] [MainThread 30864] entity: TimeSeries
2021-09-11 11:30:02,431 P[36228] [MainThread 30864] payload: {'rics': ['AAPL.O'], 'fields': ['*'], 'interval': 'daily', 'startdate': '2021-06-03T11:30:02.431790-04:00', 'enddate': '2021-09-11T11:30:02.431790-04:00'}
2021-09-11 11:30:02,431 P[36228] [MainThread 30864] Request:{'Entity': {'E': 'TimeSeries', 'W': {'rics': ['AAPL.O'], 'fields': ['*'], 'interval': 'daily', 'startdate': '2021-06-03T11:30:02.431790-04:00', 'enddate': '2021-09-11T11:30:02.431790-04:00'}}}
2021-09-11 11:30:02,432 P[36228] [MainThread 30864] Request to http://127.0.0.1:9060/api/v1/data
headers = {'Content-Type': 'application/json', 'x-tr-applicationid': 'b603fcaa78a548408cb085e13d8331a955c63fa3'}
params = None
2021-09-11 11:30:02,603 P[36228] [MainThread 30864] HTTP request response 403: {"ErrorCode":1401,"ErrorMessage":"Application id b603fcaa78a548408cb085e13d8331a955c63fa3 is invalid"}
2021-09-11 11:30:02,604 P[36228] [MainThread 30864] HTTP Response code: 403
2021-09-11 11:30:02,604 P[36228] [MainThread 30864] HTTP Response: {"ErrorCode":1401,"ErrorMessage":"Application id b603fcaa78a548408cb085e13d8331a955c63fa3 is invalid"}
2021-09-11 11:30:02,604 P[36228] [MainThread 30864] Error code 403 | Client Error: {"ErrorCode":1401,"ErrorMessage":"Application id b603fcaa78a548408cb085e13d8331a955c63fa3 is invalid"}
2021-09-11 11:30:02,604 P[36228] [MainThread 30864] HTTP request failed: EikonError-Client Error: {"ErrorCode":1401,"ErrorMessage":"Application id b603fcaa78a548408cb085e13d8331a955c63fa3 is invalid"}
Traceback (most recent call last):
File "C:\Users\ericw\anaconda3\envs\env_dev\lib\site-packages\eikon\json_requests.py", line 127, in send_json_request
_raise_for_status(response)
File "C:\Users\ericw\anaconda3\envs\env_dev\lib\site-packages\eikon\json_requests.py", line 271, in _raise_for_status
raise EikonError(response.status_code, error_msg)
eikon.eikonError.EikonError: Error code 403 | Client Error: {"ErrorCode":1401,"ErrorMessage":"Application id b603fcaa78a548408cb085e13d8331a955c63fa3 is invalid"}
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\ericw\anaconda3\envs\env_dev\lib\site-packages\IPython\core\interactiveshell.py", line 3437, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-2-a07e40b5c73a>", line 9, in <module>
ek.get_timeseries('AAPL.O', interval='daily')
File "C:\Users\ericw\anaconda3\envs\env_dev\lib\site-packages\eikon\time_series.py", line 182, in get_timeseries
ts_result = eikon.json_requests.send_json_request(TimeSeries_UDF_endpoint, payload, debug=debug)
File "C:\Users\ericw\anaconda3\envs\env_dev\lib\site-packages\eikon\json_requests.py", line 134, in send_json_request
raise EikonError(eikon_err.code, eikon_err.message)
eikon.eikonError.EikonError: Error code 403 | Client Error: {"ErrorCode":1401,"ErrorMessage":"Application id b603fcaa78a548408cb085e13d8331a955c63fa3 is invalid"}
ek.__version__
Out[3]: '1.1.12'