News:

AbanteCart v1.4.2.1 is released.

Main Menu

Do you like AbanteCart? Please rate AbanteCart or share your experience with other eCommerce entrepreneurs. Go to Softaculous rating page to add your rating or write a review

getting 401 unauthorized response from API

Started by Rawinder Dhillon, August 01, 2020, 03:37:48 PM

Previous topic - Next topic

Rawinder Dhillon

i'm not a php developer , but can understand php code
problem is i'm trying to login through API. As i understand it , it includes 2 steps , first send email , password and api_key through Post Url
htps://mydomain.com/?rt=a/account/login&email=xxxxxx@gmail.com&password=xxxxxxx&api_key=12345
according to me , it will hit login.php & return me a Token and code 200.(as i can see from login .php in API Folder )
but it is returning 401, unauthorized
Now the questions are ?
M
ay be it is due to first step and yet no functionality  for resend data with tokens, but how can i get token in first step?
as i'm not getting one, i thought it is in the form of json , and  as response of command .


*with text_api.php i'm able to login with customer credentials
** Able to fetch Product with Get Command from Browser

Rawinder Dhillon

problem solved by sending data in x-www-form-urlencoded format

Basara


Forum Rules Code of conduct
AbanteCart.com 2010 -