Forums
(@horsehcj)
9 years, 10 months ago
Hi iScot, I’m trying to create a post from mobile app using javascript
Hello Ali,
This only work if I already logged in to the site, what if I’m not logged in?
In step 2, https://api_url/?json=auth.generate_auth_cookie&nonce=99bf312d6a&username=myUserName&password=mypassword
I’m getting an object contains: “cookie”:”myUsername|1422438042|VRFCgnf4j4d9kMZeiIviRhFioylWTfQnsZVjV64cM1l|f6ada3813819b6063011148176847dedb6a037eddac730d592944ae42af189fd”
As tfischer203 mentioned, I should be able to get a cookie and should look something like ‘wordpress_logged_in_68548322…’.
and use https://localhost/api/posts/create_post/?nonce=94873495&title=Testing&$COOKIE_HEADER=cookieValueFromAbove to create a post
Am I missing something?