TRAPI Scope

When attempting to test python modules in rdp_python_samples_v2.zip, we encountered the error message Missing scopes: [trapi.alerts.research.crud]. Does this mean I need to go to my Refinitiv account manager to make sure the scope is permissioned for account/credential?

>$ python researchMessages.py -l

Existing token read from: token2.txt

Getting all open research subscriptions

Traceback (most recent call last):

File "researchMessages.py", line 222, in <module>

showActiveSubscriptions()

File "researchMessages.py", line 210, in showActiveSubscriptions

raise ValueError("Unable to get subscriptions. Code %s, Message: %s" % (dResp.status_code, dResp.text))

ValueError: Unable to get subscriptions. Code 403, Message: {"error":{"id":"9f9b9663-122c-404e-a14a-8ee7acd80ef8","code":"insufficient_scope","message":"access denied. Scopes required to access the resource: [trapi.alerts.research.crud]. Missing scopes: [trapi.alerts.research.crud]","status":"Forbidden"}}

Best Answer

  • Gurpreet
    Answer ✓

    Hi @ETLBATeam,

    Yes, there is a separate provisioning process for Research API. In addition to the username/password/appkey, you will also need a UUID, which will be provided by your account manager. This uuid should be entered into the credentials file as well.

Answers

  • @ETLBATeam

    You can check the token.txt file generated when running rdpToken.py to verify the permissioned scopes.

    You may need to contact the Refinitiv account manager to verify the permission.