WooCommerce handing over the key it made
POST
/shops/woocommerce/callback
const url = 'https://example.com/shops/woocommerce/callback';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"key_id":1,"user_id":"example","consumer_key":"example","consumer_secret":"example","key_permissions":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/shops/woocommerce/callback \ --header 'Content-Type: application/json' \ --data '{ "key_id": 1, "user_id": "example", "consumer_key": "example", "consumer_secret": "example", "key_permissions": "example" }'Not for calling by hand. WooCommerce posts the key pair here once the shop owner approves; the sealed state it carries says which business and shop. Answers 200 when the shop is connected and 400 for anything else, without saying what.
Request Bodyrequired
Section titled “Request Bodyrequired”Responses
Section titled “Responses”Connected
Not an approval Bottle asked for
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "not_found", "message": "Customer not found"}Too many calls from one address
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "not_found", "message": "Customer not found"}