Merhabalar dünden beridir Trendyol api ile bir bağlantı kuramadım. Sürekli cloudflare 'you have beden blocked' 403 hatası alıyorum işin içinden çıkamadım yardımcı olursanız sevinirim.
Alıntı
from requests.auth import HTTPBasicAuth
import requests
headers = {
"Content-Type": "application/json",
"User-Agent": f"{supplier_id} - SelfIntegration"
}
url = f"https://api.trendyol.com/sapigw/suppliers/{supplier_id}/products"
response = requests.get(url, headers=headers, auth=HTTPBasicAuth(f"{supplier_id}:{api_key}", api_secret))
print("Status Code:", response.status_code)
try:
print("Response JSON:", response.json())
except Exception:
print("Response Text:", response.text)