@@ -95,6 +95,7 @@ Setup for the old Wordpress API:
95
95
)
96
96
97
97
Setup for the new WP REST API v2:
98
+ (Note: the username and password are required so that it can fill out the oauth request token form automatically for you)
98
99
99
100
.. code-block :: python
100
101
@@ -107,7 +108,9 @@ Setup for the new WP REST API v2:
107
108
api = " wp-json" ,
108
109
version = " wp/v2" ,
109
110
wp_user = " XXXX" ,
110
- wp_pass = " XXXX"
111
+ wp_pass = " XXXX" ,
112
+ oauth1a_3leg = True ,
113
+ creds_store = " ~/.wc-api-creds.json"
111
114
)
112
115
113
116
Setup for the old WooCommerce API v3:
@@ -141,27 +144,29 @@ Setup for the new WP REST API integration (WooCommerce 2.6 or later):
141
144
Options
142
145
~~~~~~~
143
146
144
- +-----------------------+-------------+----------+-------------------------------------------------------------------------------------------------------+
145
- | Option | Type | Required | Description |
146
- +=======================+=============+==========+=======================================================================================================+
147
- | ``url `` | ``string `` | yes | Your Store URL, example: http://wp.dev/ |
148
- +-----------------------+-------------+----------+-------------------------------------------------------------------------------------------------------+
149
- | ``consumerKey `` | ``string `` | yes | Your API consumer key |
150
- +-----------------------+-------------+----------+-------------------------------------------------------------------------------------------------------+
151
- | ``consumerSecret `` | ``string `` | yes | Your API consumer secret |
152
- +-----------------------+-------------+----------+-------------------------------------------------------------------------------------------------------+
153
- | ``api `` | ``string `` | no | Determines which api to use, defaults to ``wp-json ``, can be arbitrary: ``wc-api ``, ``oembed `` |
154
- +-----------------------+-------------+----------+-------------------------------------------------------------------------------------------------------+
155
- | ``version `` | ``string `` | no | API version, default is ``wp/v2 ``, can be ``v3 `` or ``wc/v1 `` if using ``wc-api `` |
156
- +-----------------------+-------------+----------+-------------------------------------------------------------------------------------------------------+
157
- | ``timeout `` | ``integer `` | no | Connection timeout, default is ``5 `` |
158
- +-----------------------+-------------+----------+-------------------------------------------------------------------------------------------------------+
159
- | ``verify_ssl `` | ``bool `` | no | Verify SSL when connect, use this option as ``False `` when need to test with self-signed certificates |
160
- +-----------------------+-------------+----------+-------------------------------------------------------------------------------------------------------+
161
- | ``basic_auth `` | ``bool `` | no | Force Basic Authentication, can be through query string or headers (default) |
162
- +-----------------------+-------------+----------+-------------------------------------------------------------------------------------------------------+
163
- | ``query_string_auth `` | ``bool `` | no | Force Basic Authentication as query string when ``True `` and using under HTTPS, default is ``False `` |
164
- +-----------------------+-------------+----------+-------------------------------------------------------------------------------------------------------+
147
+ +-----------------------+-------------+----------+------------------------------------------------------------------------------------------------------------------+
148
+ | Option | Type | Required | Description |
149
+ +=======================+=============+==========+==================================================================================================================+
150
+ | ``url `` | ``string `` | yes | Your Store URL, example: http://wp.dev/ |
151
+ +-----------------------+-------------+----------+------------------------------------------------------------------------------------------------------------------+
152
+ | ``consumerKey `` | ``string `` | yes | Your API consumer key |
153
+ +-----------------------+-------------+----------+------------------------------------------------------------------------------------------------------------------+
154
+ | ``consumerSecret `` | ``string `` | yes | Your API consumer secret |
155
+ +-----------------------+-------------+----------+------------------------------------------------------------------------------------------------------------------+
156
+ | ``api `` | ``string `` | no | Determines which api to use, defaults to ``wp-json ``, can be arbitrary: ``wc-api ``, ``oembed `` |
157
+ +-----------------------+-------------+----------+------------------------------------------------------------------------------------------------------------------+
158
+ | ``version `` | ``string `` | no | API version, default is ``wp/v2 ``, can be ``v3 `` or ``wc/v1 `` if using ``wc-api `` |
159
+ +-----------------------+-------------+----------+------------------------------------------------------------------------------------------------------------------+
160
+ | ``timeout `` | ``integer `` | no | Connection timeout, default is ``5 `` |
161
+ +-----------------------+-------------+----------+------------------------------------------------------------------------------------------------------------------+
162
+ | ``verify_ssl `` | ``bool `` | no | Verify SSL when connect, use this option as ``False `` when need to test with self-signed certificates |
163
+ +-----------------------+-------------+----------+------------------------------------------------------------------------------------------------------------------+
164
+ | ``basic_auth `` | ``bool `` | no | Force Basic Authentication, can be through query string or headers (default) |
165
+ +-----------------------+-------------+----------+------------------------------------------------------------------------------------------------------------------+
166
+ | ``query_string_auth `` | ``bool `` | no | Use query string for Basic Authentication when ``True `` and using HTTPS, default is ``False `` which uses header |
167
+ +-----------------------+-------------+----------+------------------------------------------------------------------------------------------------------------------+
168
+ | ``creds_store `` | ``string `` | no | JSON file where oauth verifier is stored (only used with OAuth_3Leg) |
169
+ +-----------------------+-------------+----------+------------------------------------------------------------------------------------------------------------------+
165
170
166
171
Methods
167
172
-------
0 commit comments