Authentication with stripe-python

Learn about API keys and how to authenticate requests to the Stripe API using the stripe-python client library. You can set API keys globally or per-request. In this episode, we cover secret keys, public or publishable keys, restricted keys, and webhook signing secrets.

### Presenter

CJ Avilla - Developer Advocate at Stripe - https://twitter.com/cjav_dev

### Resources

Documentation: https://stripe.com/docs/api/authentication
Official client library: https://github.com/stripe/stripe-python
Code: https://github.com/stripe-samples/developer-office-hours/blob/master/2020-10-30-client-libraries/python/authentication.py

### Table of contents

00:00 Overview
00:08 Authorization header
00:18 Types of API keys
00:38 Publishable keys
01:00 Secret keys
01:44 Restricted keys
02:07 Webhook signing secrets
03:33 Roll API keys
04:03 Set API key globally
05:33 Set API key per-request
06:02 Authenticate requests for Stripe Connect per-request
07:38 Authenticate requests for Stripe Connect globally
08:28 Conclusion

### Support

If you have a question, please feel free to reach out to our support team on Discord at https://stripe.com/go/developer-chat.

### Updates

Sign up to stay updated with developer news: https://go.stripe.global/dev-digest

### Feedback

If you have any feedback about this or other episodes, let us know: https://forms.gle/VjNqzRhotM2snYo88.
#Stripe #Payments