Title: iScot's Replies | WordPress.org

---

# iScot

  [  ](https://wordpress.org/support/users/iscot/)

 *   [Profile](https://wordpress.org/support/users/iscot/)
 *   [Topics Started](https://wordpress.org/support/users/iscot/topics/)
 *   [Replies Created](https://wordpress.org/support/users/iscot/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/iscot/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/iscot/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/iscot/engagements/)
 *   [Favorites](https://wordpress.org/support/users/iscot/favorites/)

 Search replies:

## Forum Replies Created

Viewing 12 replies - 1 through 12 (of 12 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Redirection] Category & Tag redirection](https://wordpress.org/support/topic/category-tag-redirection/)
 *  Thread Starter [iScot](https://wordpress.org/support/users/iscot/)
 * (@iscot)
 * [9 years ago](https://wordpress.org/support/topic/category-tag-redirection/#post-9199363)
 * Find out :
 * /tag/(.*)/ and /category/(.*)/
 * Thx everybody
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[JSON API Auth] Error: You need to login with a user that has 'edit_posts' capacity.](https://wordpress.org/support/topic/error-you-need-to-login-with-a-user-that-has-edit_posts-capacity/)
 *  [iScot](https://wordpress.org/support/users/iscot/)
 * (@iscot)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/error-you-need-to-login-with-a-user-that-has-edit_posts-capacity/page/2/#post-4598769)
 * Tom,
 * You saved my week ! It’s working. Yep, it was a misunderstanding.
 * I just had to add the “Cookie: NAME=VALUE” to the request for getting nonce too.
 * But, it would be pretty nice to have a easiest way to make it run by Ali’s API.
   I have to send 4 requests to make it run.
 * Ali, I’ll stand for your update asap.
 * Thanks
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[JSON API Auth] Error: You need to login with a user that has 'edit_posts' capacity.](https://wordpress.org/support/topic/error-you-need-to-login-with-a-user-that-has-edit_posts-capacity/)
 *  [iScot](https://wordpress.org/support/users/iscot/)
 * (@iscot)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/error-you-need-to-login-with-a-user-that-has-edit_posts-capacity/page/2/#post-4598766)
 * Thank you Ali. It would be great !
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[JSON API Auth] Error: You need to login with a user that has 'edit_posts' capacity.](https://wordpress.org/support/topic/error-you-need-to-login-with-a-user-that-has-edit_posts-capacity/)
 *  [iScot](https://wordpress.org/support/users/iscot/)
 * (@iscot)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/error-you-need-to-login-with-a-user-that-has-edit_posts-capacity/page/2/#post-4598763)
 * Hi everybody,
 * Ali, I confirm that your process gets success if and only if you try to execute
   all request from your browser and when you are logged in your site !
 * But as I mentioned before, my target is to make run a mobile app (front-end) 
   with a web site designed on wordpress (back-end) ! That’s why all requests are
   written in a unique php script. In this case, it’s not working. doesn’t matter
   if i’m logged in browser or not.
 * Any idea ?
 * ——————————————-
 * Tom, i finally find out my wordpress-logged-in cookie. I’m not sure that it should
   be written ike this in my script :
 * $json_url = “[http://mydomainname/api/create_post/?nonce=&#8221](http://mydomainname/api/create_post/?nonce=&#8221);.
   $nonce . “&cookie=” . $cookie . “&author=” . $arg1 . “&title=” . $arg3 . “&content
   =” . $arg4 . “&status=publish”;
 * // Initializing curl
    $ch = curl_init( $json_url );
 * // Configuring curl options
    $options = array( CURLOPT_RETURNTRANSFER => true,
   CURLOPT_HTTPHEADER => array(‘Content-type: application/json’, ‘COOKIE_HEADER:
   wordpress_logged_in_09451d069f48070a06dbaa1d519fd5b8’) );
 * // Setting curl options
    curl_setopt_array( $ch, $options );
 * // Getting results
    $result = curl_exec($ch);
 * ——————————————-
 * horsehcj, what are you trying to do precisely ?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[JSON API Auth] Error: You need to login with a user that has 'edit_posts' capacity.](https://wordpress.org/support/topic/error-you-need-to-login-with-a-user-that-has-edit_posts-capacity/)
 *  [iScot](https://wordpress.org/support/users/iscot/)
 * (@iscot)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/error-you-need-to-login-with-a-user-that-has-edit_posts-capacity/#post-4598759)
 * Thank you Ali. I’m trying to create a post from my mobile app android (client
   side). Server side (wordpress) is hosted on a Godaddy server. I’m not using a
   browser. Mobile app communicate with backend from PHP & Json Api.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[JSON API Auth] Error: You need to login with a user that has 'edit_posts' capacity.](https://wordpress.org/support/topic/error-you-need-to-login-with-a-user-that-has-edit_posts-capacity/)
 *  [iScot](https://wordpress.org/support/users/iscot/)
 * (@iscot)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/error-you-need-to-login-with-a-user-that-has-edit_posts-capacity/#post-4598757)
 * Ali I guess Yes. I check it several time ! I also tried with administrator. There
   is no problem with user capability
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[JSON API Auth] Error: You need to login with a user that has 'edit_posts' capacity.](https://wordpress.org/support/topic/error-you-need-to-login-with-a-user-that-has-edit_posts-capacity/)
 *  [iScot](https://wordpress.org/support/users/iscot/)
 * (@iscot)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/error-you-need-to-login-with-a-user-that-has-edit_posts-capacity/#post-4598756)
 * tfischer203 : I do not find that information. Is this a fixed value or reset 
   periodically ?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[JSON API Auth] Error: You need to login with a user that has 'edit_posts' capacity.](https://wordpress.org/support/topic/error-you-need-to-login-with-a-user-that-has-edit_posts-capacity/)
 *  [iScot](https://wordpress.org/support/users/iscot/)
 * (@iscot)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/error-you-need-to-login-with-a-user-that-has-edit_posts-capacity/#post-4598753)
 * Thanks…yes, i believe too. I’m trying to connect my app mobile to wordpress. 
   So i’m using json api plugin and php script. In my script, i’m sending two json
   url (curl).
 * I’m sending requests below:
 * 1-
    [http://localhost/api/get_nonce/?controller=posts&method=create_post](http://localhost/api/get_nonce/?controller=posts&method=create_post)
 * 2-
    [http://localhost/api/create_post/?nonce=e04af86eec&author=iScot&title=Test&content=Hello%20Mc%20Fly&status=publish](http://localhost/api/create_post/?nonce=e04af86eec&author=iScot&title=Test&content=Hello%20Mc%20Fly&status=publish)
 * But it’s not working. I get this error : You need to login with a user that has‘
   edit_posts’ capacity
 * When I try to make changes as mentionned higher, i got this error : Your ‘nonce’
   value was incorrect. Use the ‘get_nonce’ API method.
 * Hope to be clear enough !
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[JSON API Auth] Error: You need to login with a user that has 'edit_posts' capacity.](https://wordpress.org/support/topic/error-you-need-to-login-with-a-user-that-has-edit_posts-capacity/)
 *  [iScot](https://wordpress.org/support/users/iscot/)
 * (@iscot)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/error-you-need-to-login-with-a-user-that-has-edit_posts-capacity/#post-4598751)
 * Hi, I’m trying to create a post from mobile app. But no way. I’ve the same problem.
   When I try all solutions suggested, I got a new error : “Your ‘nonce’ value was
   incorrect. Use the ‘get_nonce’ API method.”
 * Ali, you talk about another plugin ! Is there available ?
 * Any help would be welcome.
    Thanks
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[JSON API User] get xprofile data](https://wordpress.org/support/topic/get-xprofile-data/)
 *  Thread Starter [iScot](https://wordpress.org/support/users/iscot/)
 * (@iscot)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/get-xprofile-data/#post-5639997)
 * Many thanks Ali
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[JSON API User] User registration with s2member](https://wordpress.org/support/topic/user-registration-with-s2member/)
 *  Thread Starter [iScot](https://wordpress.org/support/users/iscot/)
 * (@iscot)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/user-registration-with-s2member/#post-5610931)
 * Hi Ali,
 * Thank you. I’ll wait for your pro version plugin.
 * But belive me, “wp_s2member_custom_fields” are stored in table “wp_usermeta”.
   s2member stors new custom fields there !
 * Thank
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[JSON API User] User registration with s2member](https://wordpress.org/support/topic/user-registration-with-s2member/)
 *  Thread Starter [iScot](https://wordpress.org/support/users/iscot/)
 * (@iscot)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/user-registration-with-s2member/#post-5610920)
 * Dear Ali,
 * Thank you for your fast response. Your API works well. Except in the case where
   the meta-value must be stored as “serilized array”.
 * the end result should be:
 * meta_key = wp_s2member_custom_fields
    meta_value =a:3:{s:12:”mobile_phone”;s:
   10:”0123456789″;s:12:”country_code”;s:2:”FR”;s:11:”postal_code”;s:5:”75016″;}
 * But if I send the following URL:
    json_url $ = “[http://www.chkun.com/api/user/update_user_meta/?cookie=&#8221](http://www.chkun.com/api/user/update_user_meta/?cookie=&#8221);.
   $ arg1. “& meta_key = wp_s2member_custom_fields & meta_value =”. $arg9;
 * Where $arg9 = a:3:{s:12:”mobile_phone”;s:10:”0123456789″;s:12:”country_code”;
   s:2:”FR”;s:11:”postal_code”;s:5:”75016″;}
 * The stored value is:
    s:103:”a:3:{s:12:”mobile_phone”;s:10:”0123456789″;s:12:”
   country_code”;s:2:”FR”;s:11:”postal_code”;s:5:”75016″;
 * In summary instead of a table I get a string!
 * Any idea to what to do ?

Viewing 12 replies - 1 through 12 (of 12 total)