Python ile API'lere Giriş
Chris Ramakers
Engineering Manager


| Yöntem | Uygulama Kolaylığı | Güvenlik Düzeyi |
|---|---|---|
| Temel Kimlik Doğrulama | ⭐ ⭐ ⭐ ⭐ ⭐ | ⭐ ☆ ☆ ☆ ☆ |
| API anahtarı/jetonu ile Kimlik Doğrulama | ⭐ ⭐ ⭐ ⭐ ☆ | ⭐ ⭐ ☆ ☆ ☆ |
| JWT ile Kimlik Doğrulama | ⭐ ⭐ ⭐ ☆ ☆ | ⭐ ⭐ ⭐ ⭐ ☆ |
| OAuth 2.0 | ⭐ ⭐ ☆ ☆ ☆ | ⭐ ⭐ ⭐ ⭐ ⭐ |
İpucu: Hangi kimlik doğrulama yöntemini kullanmanız gerektiğini öğrenmek için kullandığınız API’nin dokümantasyonunu kontrol edin!

# Bu, isteği göndermeden önce otomatik olarak Basic Authentication başlığı ekler
requests.get('http://api.music-catalog.com', auth=('username', 'password'))
http://api.music-catalog.com/albums?access_token=faaa1c97bd3f4bd9b024c708c979feca
params = {'access_token': 'faaa1c97bd3f4bd9b024c708c979feca'}
requests.get('http://api.music-catalog.com/albums', params=params)

headers = {'Authorization': 'Bearer faaa1c97bd3f4bd9b024c708c979feca'}
requests.get('http://api.music-catalog.com/albums', headers=headers)
Python ile API'lere Giriş