☕️ 𝗕𝘂𝘆 𝗺𝗲 𝗮 𝗰𝗼𝗳𝗳𝗲𝗲:
To support the channel and encourage new videos, please consider buying me a coffee here:
https://ko-fi.com/bugbytes
In this video, we'll see how to add API Key protection to our APIs created with Django REST Framework. We'll look at the HasAPIKey permission, and how to create, view and revoke API Keys in the Django Admin. We'll also see how to send requests with our API Key in the Authorization HTTP Header.
📌 𝗖𝗵𝗮𝗽𝘁𝗲𝗿𝘀:
00:00 Intro
01:45 Adding Django REST Framework to project
02:56 Adding a REST Framework serializer
05:05 Creating REST Framework ListAPIView
08:44 Restricting API access with API Keys
10:51 Creating, Viewing and Revoking API Keys in Django Admin
13:50 Adding HasAPIKey permission to DRF view
15:25 Making authorised requests with API Key
𝗦𝗼𝗰𝗶𝗮𝗹 𝗠𝗲𝗱𝗶𝗮:
📖 Blog: https://bugbytes.io/posts/
👾 Github: https://github.com/bugbytes-io/
🐦 Twitter: / bugbytesio
📚 𝗙𝘂𝗿𝘁𝗵𝗲𝗿 𝗿𝗲𝗮𝗱𝗶𝗻𝗴 𝗮𝗻𝗱 𝗶𝗻𝗳𝗼𝗿𝗺𝗮𝘁𝗶𝗼𝗻:
Djangorestframework-api-key: https://florimondmanca.github.io/djan...
User Guide: https://florimondmanca.github.io/djan...
Serializers: https://www.django-rest-framework.org...
DRF Generic Views: https://www.django-rest-framework.org...
REST Client in VSCode: https://marketplace.visualstudio.com/...
#python #django #webdevelopment #djangorestframework
Watch video Django REST Framework - API Keys | HasAPIKey permission from djangorestframework-api-key! online without registration, duration hours minute second in high quality. This video was added by user BugBytes 23 September 2024, don't forget to share it with your friends and acquaintances, it has been viewed on our site 2,68 once and liked it 18 people.