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