apiName = "/auth/token/security/create"; should be "/auth/token/create" according to doc : https://openservice.aliexpress.com/doc/doc.htm?spm=a2o9m.11193531.0.0.48293b53drGoyV#/?docId=1364
I have exactly the same issue with you currently, working with python and their official SDK. Did you figure out your problem? Ali's technical support is useless for me.