Error message: Failed to fetch

Best Answer

  • Gurpreet
    Gurpreet admin
    Answer ✓

    Hi @Michael Ronald Cortez.Espinosa ,

    There seems to be an issue with browser when using this in the API playground. Seems like this RDP endpoint does not correctly implement the OPTIONS request, which is causing it to fail in the browser.

    You can however try and get data from this using the following python code:

    import http.client

    conn = http.client.HTTPSConnection("api.refinitiv.com")
    payload = ''
    headers = {
    'Authorization': 'Bearer eyJ0eXAiOiJhdCtq....X_tEfBA'
    }
    conn.request("GET", "/user-framework/mobile/fund-service/v1/fund/top-holdings/LP40189339", payload, headers)
    res = conn.getresponse()
    data = res.read()
    print(data.decode("utf-8"))


    I will raise a service ticket for this issue.

Answers