Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I got an error 'Error: Response code 401 - This publisher is not registered' #34

Open
Aminejemmali opened this issue Oct 22, 2024 · 1 comment

Comments

@Aminejemmali
Copy link

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.") '

@josylad
Copy link

josylad commented Nov 13, 2024

Hello,
you need to create an API account at https://openservice.aliexpress.com and get approved.

Make sure you request API access after adding your app in the dashboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants