-
Notifications
You must be signed in to change notification settings - Fork 37
Description
hi , when i try to get product details and affliate link , it show me 401 errot -Error: Response code 401 - This publisher is not registered
or 404 error Error: Response code 404 - System Error
this is a part of my code for test
'from aliexpress_api import AliexpressApi, models
from config import APP_KEY, APP_SECRET, TRACKING_ID, LANGUAGE, CURRENCY
from product_fetcher import ProductFetcher
from aliexpress_api.errors.exceptions import ApiRequestResponseException
Initialize the AliexpressApi
aliexpress = AliexpressApi(APP_KEY, APP_SECRET, models.Language.EN, models.Currency.EUR, TRACKING_ID)
aliexpress = AliexpressApi(APP_KEY, APP_SECRET, models.Language.EN, models.Currency.EUR, TRACKING_ID)
Initialize the ProductFetcher
product_fetcher = ProductFetcher(APP_KEY,APP_SECRET,models.Language.EN,models.Currency.EUR)
try:
# Get products details
affiliate_links = aliexpress.get_affiliate_links('https://a.aliexpress.com/_EQPyrLx')
print(affiliate_links[0].promotion_link)
except ApiRequestResponseException as e:
print(f"Error: {e}")
except IndexError:
print("No product found for the given IDs or URLs.") '