• 14-08-2025, 13:20:54
    #1
    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)
  • 14-08-2025, 13:51:00
    #2
    Merhaba,
    Kodun tamamı bu şekilde mi ?
  • 14-08-2025, 14:06:41
    #3
    Ncdiollc adlı üyeden alıntı: mesajı görüntüle
    Merhaba,
    Kodun tamamı bu şekilde mi ?
    Keyler ve id de arada 3 satır vardı sildim
  • 14-08-2025, 14:09:25
    #4
    afblgn adlı üyeden alıntı: mesajı görüntüle
    Keyler ve id de arada 3 satır vardı sildim

    Muhtemel yapınıza göre;

    from requests.auth import HTTPBasicAuth
    import requests
    
    supplier_id = "id_bilgisi"
    api_key = "api_key"
    api_secret = "api_key_secret"
    
    headers = {
        "Content-Type": "application/json",
        "User-Agent": f"{supplier_id} - SelfIntegration"
    }
    
    url = f"https://api.trendyol.com/sapigw/suppliers/{supplier_id}/products"
    
    username = f"{supplier_id}-{api_key}"
    password = api_secret
    
    response = requests.get(url, headers=headers, auth=HTTPBasicAuth(username, password))
    
    print("Status Code:", response.status_code)
    try:
        print("Response JSON:", response.json())
    except Exception:
        print("Response Text:", response.text)
    Auth kullanımınız yanlıştı bu kod ile deneyin
  • 14-08-2025, 14:22:58
    #5
    Ncdiollc adlı üyeden alıntı: mesajı görüntüle
    Muhtemel yapınıza göre;

    from requests.auth import HTTPBasicAuth
    import requests
    
    supplier_id = "id_bilgisi"
    api_key = "api_key"
    api_secret = "api_key_secret"
    
    headers = {
        "Content-Type": "application/json",
        "User-Agent": f"{supplier_id} - SelfIntegration"
    }
    
    url = f"https://api.trendyol.com/sapigw/suppliers/{supplier_id}/products"
    
    username = f"{supplier_id}-{api_key}"
    password = api_secret
    
    response = requests.get(url, headers=headers, auth=HTTPBasicAuth(username, password))
    
    print("Status Code:", response.status_code)
    try:
        print("Response JSON:", response.json())
    except Exception:
        print("Response Text:", response.text)
    Auth kullanımınız yanlıştı bu kod ile deneyin
    Tekrar cloudflare den 403 hatası döndü hocam.
    Cloudflareden dönmesi keylerde değil attığım istekten kaynaklı hata olduğundan galiba. Atladığım bir şey mi var acaba
  • 15-08-2025, 16:02:33
    #6
    afblgn adlı üyeden alıntı: mesajı görüntüle
    Tekrar cloudflare den 403 hatası döndü hocam.
    Cloudflareden dönmesi keylerde değil attığım istekten kaynaklı hata olduğundan galiba. Atladığım bir şey mi var acaba
    Localde mi deniyorsunuz
  • 19-08-2025, 10:43:10
    #7
    Çözüldü mü bende postman ile trendyolun kendi koleksiyonunu indirdim ama cloudflare hatası veriyor
  • 14-03-2026, 19:21:30
    #8
    onurcici adlı üyeden alıntı: mesajı görüntüle
    Çözüldü mü bende postman ile trendyolun kendi koleksiyonunu indirdim ama cloudflare hatası veriyor
    Evet hocam sorun auth tandi