For a deeper look into our Elektron API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
3 1 0 0

Client_id generation issue in python sample websocket api code

I was trying to generate the client_id, but it did not work. Actually I have 3 pairs of Machine IDs and passwords under my account. So the question is the generated client_id is shared by all three Machine IDs or one Machine ID one client_id? Why I am asking this is because when I log in the AppkeyGenerator, it only requires my email and account password instead of the Machine ID & password.

Besides, I noticed that the auth_url in the sample is 'https://api.refinitiv.com:443/auth/oauth2/beta1/token'. Then how about 'https://api.edp.thomsonreuters.com/auth/oauth2/beta1/token'? What is the difference between them? Should I prefer one to the other when I try to get the real time fx rate?

treprdp-apiwebsocketsrrtoauthentication
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.

1 Answer

Upvote
Accepted
20.3k 73 10 20

Hi @yxq

Can you please expand on what you mean by 'it did not work'? Are you able to login to the generator? Do you get an error message when you try to generate the AppKey? Which check box do you select for API before you select the Register New app button?

I am able to use the same AppKey with my different MachineID logins. The appkey is used to identify your application - not the login.

The https://api.refinitiv.com:443 currently redirects to api.edp.thomsonreuters.com - so you should use api.refinitiv.com to avoid having to change your code in the future.


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.

Thanks for your reply. That's very detailed and helpful.

For the AppKey, I managed to get it for all my three Machine IDs and I understand now they share the same client_id. And now I can get the streaming data with the client_id.

My previous c++ driver was using api.edp.thomsonreuters.com. Given your explanation I will switch my current python application to https://api.refinitiv.com same as the sample code.

Click below to post an Idea Post Idea