I need to deliver the Api token from the json response not the header
-
I got token in my Login API. How to use this Api to Add product in wishlist or Cart or any Api of customer data and order?
-
Thank you so much. It is a great help from bagisto Forums. Thanks again to all.
-
@sandeep did u find the solution, how to send token to further interact with apis
-
Hi.
Thanks this allows me to get the token. But however, I am getting a Cors issue. See the below image and please advise on how I can solve this. I am using VueJs in the front end.
![alt text]( image url)
-
@eolykab
you may read this guide to fixup this issue https://medium.com/@dtkatz/3-ways-to-fix-the-cors-error-and-how-access-control-allow-origin-works-d97d55946d9 -
@sandeep i have the same problem ! did you find a solution ?
-
Heads up people!
After 6 hours of digging through the code base this line stood out:
$this->guard = request()->has('token') ? 'api' : 'customer';
It means even if you have the header set correctly, your mobile application will still not authenticate. So, to solve this, what you need to do is add:
cartItem.put("token",sharedPref.getCustomerApiToken());
On all objects that need to be authenticated. If stuck reach-out.
-
How can i use token for adding product to cart.
I got token from login api. but when i am using this token in cart add it respond 500 error -
Hi @simi61193
May, I know the full request data and URI you are hitting.
-
Hello we are trying to use graphql api for admin authentication but we are facing 500 internal server error.
can you please assist is there anything we need to enable or install package for access.
thank you.