AbanteCart Development > API Development
getting 401 unauthorized response from API
(1/1)
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:
Thank you for posting your solution
Navigation
[0] Message Index
Go to full version