Replies: 3 comments
-
A good place to start would be here: https://woocommerce.github.io/woocommerce-rest-api-docs/?python#authentication It explains how to get the WooCommerce API set up and generating keys |
Beta Was this translation helpful? Give feedback.
-
I have a similar question. Am I correct that the documentation linked above is for the WooCommerce API, where the WordPress api uses different authentication methods? I would like to authenticate the WordPress API using the application password as mentioned by the OP or is it somehow possible using the secret keys generated by the WooCommerce plugin? |
Beta Was this translation helpful? Give feedback.
-
Please refer to this answer: #783 |
Beta Was this translation helpful? Give feedback.
-
Hi, I would like to read all Media files in my Wordpress site (subsite in Multisite). I don't know how to authenticate.
All I have is an "application password" on my user in WP but I don't find example code how to use this.
E.g.
//using JWT
RestAPI rest = new RestAPI("http://www.yourstore.co.nz/wp-json/jwt-auth/v1/token", "", "");
//using OAuth
RestAPI rest = new RestAPI("http://www.yourstore.co.nz/wp-json/wp/v2/", "<Client_Key>", "<Client_Secret>");
rest.oauth_token = "<OAuth_Token>";
rest.oauth_token_secret = "<OAuth_Token_Secret>";
I read it is also possible now to use the Woocommerce ck and cs to access the WP rest API but also I don't know how to use this.
I need some sample code to start using the WP rest api (Media files read, add, delete).
Beta Was this translation helpful? Give feedback.
All reactions