Authentication
The LLM-ready API supports three methods of authentication:
Email market.intelligence@spglobal.com to obtain LLM-ready API Okta credentials.
Browser Login
This method is not applicable when working on a remote machine without direct access to a browser window and is not advisable for use in production workflows.
Browser login is a convenient way to quickly get started using the LLM-ready API and is available in the kFinance Python Library by executing the following code:
client = Client()
A browser window will open prompting Okta sign-in with LLM-ready API Okta credentials. Use the email address associated with the trial credentials as the username.
Refresh Token
Refresh tokens expire after 7 days. This method is not advisable for use in production workflows.
Refresh tokens can be used for authentication in the Python Library and when making API calls directly.
See Kensho's general instructions for step-by-step guidance on obtaining a refresh token.
To authenticate with a refresh token:
- Navigate to LLM-ready API Manual Login (opens in a new tab)
- Log in with your LLM-ready API Okta credentials
- Copy the refresh token
- Use the refresh token to authenticate your API requests.
client = Client(refresh_token="your_refresh_token_here")
Public/Private Key
Public/Private keypair authentication is recommended when using Kensho APIs for production workflows.
See keypair authentication for step-by-step instructions to get set up with a public/private key and your client_id
.
client = Client(client_id="your_client_id_here", private_key="your_private_key_here")