AbanteCart Development > API Development

Error with Login API on AbanteCart Storefront in ReactJS

(1/1)

ubaid:
I am currently in the process of creating an AbanteCart storefront using ReactJS. However, I am encountering an issue with the login API. Despite providing all the required credentials correctly, the API always returns an error and fails to log me in.

I have double-checked that I am using the correct endpoint and that the credentials I am providing are correct. I am unsure if I am missing something or if there is a bug in the API.

I would greatly appreciate any assistance in resolving this issue. Kindly help me out.

Thank you.


yonghan79:
Hi,

Please try to pass the the username and password from body.

ubaid:
Thanks for your reply. But still the problem is the same.

yonghan79:
On params, you just need the rt. loginname, password, api_key(optional) should be in body.

ubaid:
It is working on postman, but when I am trying to post through axios in reactjs it is showing this CORS error


"Access to XMLHttpRequest at 'api url' from origin 'localhost' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: It does not have HTTP ok status."

Navigation

[0] Message Index

Go to full version
Powered by SMFPacks Social Login Mod