question

Upvotes
Accepted
1 1 1 2

Access denied, what I am doing wrong?

Hi,


I am trying to access the data my company bought through the python API. I have created a config file (according to the github instructions) where I include the machine ID, password and the app key.

I do the following:

import refinitiv.data as rd
from refinitiv.data.content import esg
import os
os.environ["RD_LIB_CONFIG_PATH"] = ".. \refinitiv-data.config.json"
rd.open_session('platform.rdp')
response = esg.universe.Definition().get_data()
response.data.df

It works to start the session so something seem to be working.

But the line "response = esg.universe.Definition().get_data()" gives me an error:

RDError: Error code 403 | access denied. Scopes required to access the resource: [trapi.data.esg.universe.read]. Missing scopes: [trapi.data.esg.universe.read]

Which sounds like I don't have access to this data. Am I trying to access the wrong stuff? Or what I am doing wrong?

This is the product my company bought according to the invoice:

1641990475268.png


I am stumbling in the dark a bit here, I hope someone can send me in the right direction.

Thank you

python apiesg
1641990475268.png (21.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.

Hello @jens.wilhelmsson

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?


If so please can you click the 'Accept' text next to the appropriate reply? This will guide all community members who have a similar question.

Thanks,


AHS

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,


AHS

Upvotes
Accepted
25.3k 87 12 25

hi @jens.wilhelmsson

Please speak to your Refinitiv Account team/representative.

The above error indicates that your credential (machine ID) is not licensed for trapi.data.esg.universe.read. Either your credential was not configured correctly by the account team or the required licence is not included in the products you purchased.

Whilst the moderators on this forum can help with API how to / programming type questions - we do not have access to your credentials/licence 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.

Hi @jens.wilhelmsson

I should point out that your code looks fine - I tried it out here with my credentials and I was able to get data back.

Upvotes
25.3k 87 12 25

Hi @jens.wilhelmsson

Just to eliminate a few possibilities, can you confirm if you are using a Machine ID + password in your config.json file i.e. something like

"rdp": {
                "app-key": "01232d13bf27478987d1c75f2c5fd8fc4690abcd",
                "username": "GE-A-0123456778-3-1234",
                "password": "thisisaveryveryveryverylongpasswordX$"

and NOT your email-based username?

Also, can you connect to the API Playground https://apidocs.refinitiv.com/Apps/ApiDocs using your email username and access the /data/environmental-social-governance/v2/universe endpoint?

When you click send on the API Playground do you get back a list of instruments?

esg.png

 
              

esg.png (91.7 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
1 1 1 2

Hi @umer.nalla

Thanks for your quick response. I emailed my account representative.

I also tried what you suggested here and it indeed seems like its an access issue. Here is my result:

1641993906259.png


1641993906259.png (54.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
25.3k 87 12 25

Hi @jens.wilhelmsson

Thanks for confirming.

When you discuss with your account rep, please mention the API Playground result too.

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 2

Hi @umer.nalla

Thank you, I will!

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 @jens.wilhelmsson

I am not sure this will help (I am not a Licensing person) - but it may be worth pointing out to your Account Rep that I am able to access the above data and I have the PRO ESG GLOBAL SCORES WM R-R API licence applied to my MachineID.

Could be a complete red-herring - but just in case it helps...


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.