I am writing a few custom REST APIs for Magento1.9 and I was using a session to retain a couple of custom data (It's not a headless architecture). The session was working fine across all my APIs, but when I switch to the frontend, I want the same session to persist. But it's not happening.

Upon further inspection, I found that for REST APIs, Magento uses the PHPSESSID cookie to persist the session (as does any PHP application), but for frontend, it uses cookie named frontend. But the weird thing is, even if I copy the value of the frontend cookie and put it in the PHPSESSID cookie, still, the session is not persisting. What am I doing wrong?


I want a way where if I add a product to the cart in the frontend, it should be accessible in the


of my REST API.

| improve this question | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.