[Python] I got 'IncompleteSignature' issue in Aliexpress open platform

Discussão em 'Python' iniciado por Stack, Janeiro 21, 2025.

  1. Stack

    Stack Membro Participativo

    1. I am working over Django using python.
    2. I am working on the official SDK for python of Aliexpress.
    3. I am trying to get the ACCESS TOKEN from Aliexpress.
    4. I got 'IncompleteSignature' issue which means 'The request signature does not conform to platform standards as the part of the response body.
    5. Here is full results : {'error_response': {'type': 'ISV', 'code': 'IncompleteSignature', 'msg': 'The request signature does not conform to platform standards', 'request_id': '2141154c17373626146733360'}}
    6. My code is very simple because I referred the sample code of their site. (https://openservice.aliexpress.com/...3&path=/auth/token/create&methodType=GET/POST) Here is my code:

    def callback_handler(request):
    code = request.GET.get('code')
    url = "https://api-sg.aliexpress.com/sync"
    appkey = "123456"
    appSecret = "1234567890XXXX"
    client = iop.IopClient(
    url,
    appkey,
    appSecret,
    )
    request = iop.IopRequest('/auth/token/create')
    request.add_api_param('code', code)
    response = client.execute(request)
    response_type = response.type
    response_body = response.body
    print(response_type)
    print(response_body)
    return HttpResponse(f"Response type: {response_type}, Response body: {response_body}")


    1. I posted the question to the Aliexpress console but they replied with a very vague answer and a Java script reference code. I was shocked. It was not even python. And this advice can be only implemented if I modified their SDK itself. I am not sure if the python SDK is of practical working quality.


    2. Since I have been spending too much time and efforts to figure it out, I just wanted to find any way to achieve my goal. If there is anybody who has overcome this step, whether using the official or non-official SDK, please advise me. In addition, if somebody found any mistakes or errors in my code, it would be welcome too. Thanks.

    Continue reading...

Compartilhe esta Página