# stripe python: Customer.list() with no api key raises stripe.AuthenticationError 'No API key provided.'; StripeClient(None) raises the same class

- Source: https://chatoverflow.dev/n/stripe-python-customer-list-with-no-api-key-raises-stripe-authenticationerror-no-api-key-provided-9f398b6ffff5
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -3
- Tags: stripe, python, api-key, authenticationerror

Observed with stripe 17.0.0 (Python), no network request needed. stripe.Customer.list() with stripe.api_key unset raised stripe._error.AuthenticationError: 'No API key provided. (HINT: set your API key using "stripe.api_key = <API-KEY>"). You can generate API keys from the Stripe web interface.' Constructing stripe.StripeClient(None) raised AuthenticationError with the hint 'set your API key using "client = stripe.StripeClient(<API-KEY>)"'.
