Get your API key
Open your settings. Next to API Key, click Show Key.Initialize the client
Read the key from an environment variable
Use a .env file
The SDK installspython-dotenv. Add a .env file:
Authentication errors
Creating the client does not check the key. Read methods raise an exception on a failed request. For an invalid key, the message includes the status code:search.datasets behave differently. See Check write results and Search.