Snowflake Python Okta Connection

Viewed 2181

I am trying python connection to snowflake using snowflake.connector library along with OKTA authentication. I am using the following code to execute but getting error:

Failed to execute request: HTTPSConnectionPool(host='https', port=443): Max retries exceeded with url

Code I am using

username = username for okta
authenticator = 'https://companyname.okta.com'
account_name = 'https://xy12345.us-east-2.snowflakecomputing.com/'
warehouse = ''
password = password for okta

conn = sf.connect(user = username, authenticator = authenticator, account = account_name, password = password)

Anyone has an idea to make it work?

1 Answers

I don't think your account_name is correct. It should be in the form of '<your_account_name>.<region_id>.' (e.g. 'xy12345.east-us-2.azure'). Using the URL you have in your example, it'd simply be location.

Related