access denied. Scopes required to access the resource: [trapi.data.funds.assets.read] or [trapi.d...

...emo-access]

Can someone help me? I get permission denied when trying to access funds data, everything else works normally

https://developers.refinitiv.com/content/dam/devportal/api-families/refinitiv-data-platform/refinitiv-data-platform-apis/downloads/rdp_python_samples_v2.zip

EDP_version = "/v1"
base_URL = "https://api.refinitiv.com"
category_URL = "/data/funds"
endpoint_URL = "/assets"


#==============================================
def getFundData(requestPayload):
#==============================================
RESOURCE_ENDPOINT = base_URL + category_URL + EDP_version + endpoint_URL

# Get latest access token
print("Getting OAuth access token...")
accessToken = getToken()
#print(accessToken)

dResp = requests.get(RESOURCE_ENDPOINT, headers = {"Authorization": "Bearer " + accessToken}, params = requestPayload)

if dResp.status_code != 200:
print("Unable to get data. Code %s, Message: %s" % (dResp.status_code, dResp.text))
else:
print("Funds data received:")
# Display data
jResp = json.loads(dResp.text)
print(json.dumps(jResp, indent=2))

lipperID = "40003333"
print("Getting assets data for fund: %s" % lipperID)


requestData = {
    "symbols": lipperID,
    "properties": "names"
}


getFundData(requestData)


# Get ratings data for fund
lipperID = "60003333"
print("Getting ratings data for fund: %s" % lipperID)


requestData = {
    "symbols": lipperID,
    "properties": "llsratings"
}


getFundData(requestData)


Unable to get data. Code 403, Message: {"error":{"id":"a6588ea3-a1cf-432d-88ba-1b848488ea94","code":"insufficient_scope","message":"access denied. Scopes required to access the resource: [trapi.data.funds.assets.read] or [trapi.demo-access]. Missing scopes: [trapi.data.funds.assets.read trapi.demo-access]","status":"Forbidden"}}



Best Answer

  • wasin.w
    wasin.w admin
    Answer ✓

    Hello @marcio.vasconcellos

    Thank you for contacting us. I highly recommend you contact your Refinitiv representative to verify your RDP account permission.

    The HTTP error message indicates that your RDP account does not have permission to request data from the RDP APIs /data/funds/v1/assets service endpoint.

    You can double-check your RDP account with this service on the RDP APIs Playground page as follows:

    data-fund.png