Accessing LearnDash API from mobile app
-
I am developing a mobile app that is to connect to a LearnDash site in WordPress to obtain some user-specific data. What I found out is that LearnDash provides a REST API at
https://<site>/wp-json/ldlms/v1/
, and I successfully queried the public endpoints.But when I try to access end points that require authentication, I get a 401 status. My expectation was that I could obtain a cookie via your plugin, but I keep getting these 401 errors. Manually testing the cookie from your plugin on the “normal” site using Chrome developer tools showed that the cookie itself is ok.
My suspicion is that I also need a “nonce”, but I don’t know what “controller” and “method” I should provide to your API to obtain a valid nonce for LearnDash.
Is there a way to query this from the installed site, or reverse-engineer this from the LearnDash code?
Any help you can provide me is highly appreciated, since I am quite stuck. ??
- The topic ‘Accessing LearnDash API from mobile app’ is closed to new replies.