question

Upvotes
Accepted
43 2 1 7

Unable to Open RDP Platform Session

I am not able to open Open RDP Platform Session.

username : vijay.singh@gslab.com

appkey : e84e*************************42408


Code

import refinitiv.dataplatform as rdp

import configparser as cp

cfg = cp.ConfigParser()

cfg.read('rdp.cfg')


# Open RDP Platform Session

session = rdp.open_platform_session(

cfg['rdp']['app_key'],

rdp.GrantPassword(

username = cfg['rdp']['username'],

password = cfg['rdp']['password']

)

)

session.get_open_state()



Error

2020-10-27 13:40:45,138 - Session session.platform - Thread 13440 | MainThread [Error 400 - access_denied] None


app key



rdp-apirefinitiv-data-platformauthenticationrefinitiv-data-platform-libraries
rdp-error-1.jpg (75.3 KiB)
rdp-error-2.jpg (53.0 KiB)
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.

Upvotes
Accepted
43 2 1 7

@wasin.waeosri, Could you please let me know that among RKD and RDP, which one will be more suitable for below requirement:


  • mode : Batch processing

  • language : python

  • Purpose : Data analytics on company fundamental and financial data. Flexibility in reading the data in an API request (example for a given company, read only the specified features for specified time range, in quarterly or annual basis, in csv format).

  • Preferred data format : csv

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.

Hello @vijay.singh
Sorry for the late reply, I have contacted the RDK and RKD team to help you verify this question.
Upvotes
11.5k 16 7 10

Hello @vijay.singh

The "access_denied" message indicates that it is the permission issue.

Could you please verify with the Postman authentication "Get Access Token" script? You can download the Postman collection at RDP API download page.RDP API download page. Please refer to the RDP Postman tutorial page regarding how to setup Postman environment.

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.

Upvotes
43 2 1 7

Hi @wasin.waeosri, PFB the screenshot of error I am getting after running the timeSeries.py file.


python python timeSeries.py

This is downloaded from samples.zip: https://developers.refinitiv.com/en/api-catalog/refinitiv-data-platform/refinitiv-data-platform-apis/download


Also kindly let me know if I am missing any step. As of now I have just created account of Developers Refinitv Data Platform, created app_key and thereafter running the below code.


rdp-error-4.jpg (113.6 KiB)
rdp-error-1.jpg (75.3 KiB)
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.

Upvotes
11.5k 16 7 10

Hello @vijay.singh

The timeSeries.py example returns "access_denied" when it tries to authenticate your credential with RDP Auth service.

I strongly suggest you contact your Refinitiv representative to help you verify your permission.

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.

Upvotes
7.6k 15 6 9

@vijay.singh

I just created a new rdptest.py with the following codes.

import refinitiv.dataplatform as rdp
import configparser as cp
cfg = cp.ConfigParser()
cfg.read('rdp.cfg')

print(cfg['rdp']['app_key'])
print(cfg['rdp']['username'])
print(cfg['rdp']['password'])
# Open RDP Platform Session
session = rdp.open_platform_session(cfg['rdp']['app_key'],rdp.GrantPassword(username = cfg['rdp']['username'],password = cfg['rdp']['password']))
session.get_open_state()

And then create rdp.cfg with my RDP login account.

[rdp]
app_key =  1XXXXXXXXXXXXXXXXXXXXXXXXXb
username = MXXXXXXX@cxcom
password = XXXXXXXXXXXXXXX

I can log in without the issue, but if the username and password or app id is an invalid one, it will contain a reason text after "[Error 400 - access_denied] ". But your case seems to return None.

Do you have a chance to test just codes to open sessions like my codes with incorrect username password etc and does it print any additional message?

And what version of RDP library and python you currently use?

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.

Upvotes
43 2 1 7

@wasin.waeosri, I think you are right that that there is not any programmatic issue, instead it is an permission issue.


@moragodkrit.chumsri_1, Yes I also tried it in the same way as you did and I get the "access_denied" erorr. Do you also suggest to contact the Refinitv Representative to get more clarity on required permission. It would be very helpful if you can tell what additional permissions are required to setup "rdp.open_platform_session()".


rdp-error-5.jpg (83.5 KiB)
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.

Hello @vijay.singh

You input parameters for the rdp.open_platform_session() method are correct. There is no additional parameter for permission. The permission is based on your credentials.

I found that you have contact Refinitiv Helpdesk regarding this issue. The Helpdesk and your Refinitiv representative are contacting the team that can help you verify the permission.

Hi @vijay.singh

Additionally, what is version of RDP library, httpx and python you currently use? You can use the pip list command to verify the libraries versions.

Upvotes
43 2 1 7

Hello @wasin.waeosri, PFB the version details:

python : 3.7.7

httpx : 0.14.2

refinitiv-dataplatform : 1.0.0a6

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.

Hello @vijay.singh
I just got information from your Refinitiv representative. Could you please confirm if you want to get data via Refinitiv Knowledge Direct API (RKD - formerly known as TRKD) or RDP/ RDP Libraries?
Upvotes
43 2 1 7

@wasin.waeosri,I had discussion with the Refinitve Representative and I am evaluating the available options i.e RKD, RDP, Eikon APIs.

Also the above access issue was because the account does not have permission to access RDP APIs. I will let you know if anything else is required on Q&A forum.

You did great help in getting the root cause of this access issue and providing the further leads. Thanks a lot for your support.

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.

@vijay.singh

Thank you for clarification, please let me introduce the APIs resource pages that should be helpful for you

If you are interested in RKD API:

If you are interested in Eikon Data API

If you are interested in RDP

Click below to post an Idea Post Idea