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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 1 1 1

I cannot get the market_price_rdpgw_service_discovery.py from website. Would you please send it to me for testing? Thanks.

I cannot get the market_price_rdpgw_service_discovery.py from website. Would you please send it to me for testing? Thanks.

1628505770061.png

elektronrefinitiv-realtimeelektron-sdkrrt
1628505770061.png (111.5 KiB)
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
24.9k 87 10 22

Hi @susie.di

Please look in the RDP\Python folder

1628508531890.png

You can also access the individual examples on Github websocket-api/Applications/Examples/RDP/python at master · Refinitiv/websocket-api (github.com)



1628508531890.png (16.8 KiB)
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
16.9k 32 9 12

Hello @susie.di

It seems the example code encounters the issue during the authentication process with the RDP APIs Auth service.

I am noticed that you are using the email-based username, not the Machine-ID. Please note that the RTO connections require the Machine-ID username type (GE-XXXXX). Did you get the Machine-ID from the Welcome email yet? I suggest you check the Welcome email again and try the step-by-step guide on the "Getting Start with the Machine ID" section of the Getting Started with Refinitiv Data Platform article.

This old post also helps you regarding the difference between email ID (for RDP HTTP REST APIs) and Machine ID (for RTO connection).

Once you have set up your Machine-ID, Password, and AppKey (aka Client_ID), you can test the credentials via the following cURL command or Python code.

curl --location --request POST 'https://api.refinitiv.com/auth/oauth2/v1/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer ' \
--data-urlencode 'username=<Machine ID>' \
--data-urlencode 'password=<Password>' \
--data-urlencode 'grant_type=password' \
--data-urlencode 'scope=trapi' \
--data-urlencode 'takeExclusiveSignOnControl=true' \
--data-urlencode 'client_id=<App Key>'

or Python Code

import requests

reqUrl = "https://api.refinitiv.com/auth/oauth2/v1/token"

headersList = {
    "Accept": "*/*",
    "User-Agent": "Python",
    "Content-Type": "application/x-www-form-urlencoded" 
}

payload = "username=<Machine ID>&password=<Password>&client_id=<App Key>&grant_type=password&takeExclusiveSignOnControl=true&scope=trapi"

response = requests.request("POST", reqUrl, data=payload, headers=headersList)

print(response.text)


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
24.9k 87 10 22

Hi @ngbmk

Looking at the screenshot, the password is too short to be a MachineID password.

did they click the link in the Welcome email and set the long password for the machineID?

Please follow the instructions as per the link provided - Step 2 of the Welcome Email is the one where the long password is set.

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.

Hi @susie.di and @ngbmk

When posting screenshots etc, please remove machineIDs and email addresses - as well as passwords - this is a public forum.

Upvotes
24.9k 87 10 22

Hi @ngbmk - I have deleted your last post as you included both machineID and user email address - both of which are client confidential information


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
24.9k 87 10 22

Hi @ngbmk

Please refer to the Getting Started with Refinitiv Data Platform article which my colleague linked previously - it provides detailed instructions.

For RTO connection you need to use your MachineID - GE-A-xxxxxx with a long password set using the link in the Welcome Email as described in the above article.


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 0 0 0

Hi @susie.di @umer.nalla

i just use payload = "username=GE-A-xxxxxx&password=long password sent by Susie&client_id=babbxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&grant_type=password&takeExclusiveSignOnControl=true&scope=trapi" to test connection, it still show {"error":"access_denied" ,"error_description":"Invalid username or password." }

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
24.9k 87 10 22

Hi @ngbmk

I cannot confirm what the long password would be that Susie sent you. Normally the customer uses the link in the Welcome Email to set the long password.

The error message you are seeing would indicate that the password is not valid.

I have just tried to reset your password - so you should receive an email which should allow you to set the long password yourself.

Please confirm if the email was received.

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 0 0 0

hi @umer.nalla

i just sent the mail to you.

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.