Hi,
I'm trying to use Dataiku to access lseg data. I'd like to confirm the endpoint url, app key, client id and client secret. Please confirm i'm using the correct information:
URL: "https://api.refinitiv.com/auth/oauth2/v2/token"
app key: app key generated from the API KEY generator app on the workspace desktop app.
client ID: username for desktop app
client secret: password for desktop app
I'm testing the connection via dataiku and received the following error:
'{"error":"invalid_client" ,"error_description":"Invalid client or client credentials." }'
Here is the sample code. If I'm not using the correct credentials, please let me know what I should be using instead.
import requests
import dataiku, pandas as pd
client = dataiku.api_client()
auth = client.get_auth_info(with_secrets=True)
secrets={s["key"]: s["value"] for s in auth.get("secrets",[])}
APP_KEY = secrets.get("LSEG_APP_KEY","test")
CLIENT_ID = secrets.get("LSEG_CLIENT_ID","test")
CLIENT_SECRET = secrets.get("LSEG_CLIENT_SECRET","test")
url = "https://api.refinitiv.com/auth/oauth2/v2/token"
payload = f'grant_type=client_credentials&client_id={CLIENT_ID}&client_secret={CLIENT_SECRET}&scope=trapi'
headers = {
'Content-Type': 'application/x-www-form-urlencoded'
}
response = requests.request("POST", url, headers=headers, data=payload, verify=False)
response.text