• Resolved wiloke

    (@wiloke)


    Hi there,
    I’m working on WooCommerce Rest API. I followed https://woocommerce.github.io/woocommerce-rest-api-docs/?shell#list-all-products but when trying to run

    $woocommerce = new Client(
    			'https://wilcityapp.com/',
    			'myConsumerKey',
    			'myConsumerSecret',
    			[
    				'wp_api' => true,
    				'version' => 'wc/v3',
    				'verify_ssl' => true,
    				'query_string_auth' => true // Force Basic Authentication as query string true and using under HTTPS
    			]
    		);
    
    		$aRest = $woocommerce->get('products');
    

    it always returns Sorry, you cannot list resources.
    I created myConsumerKey and myConsumerSecret under WooCommerce -> Settings -> Advanced -> Rest API already.
    I confirmed that
    $_SERVER[‘HTTP_AUTHORIZATION’], $_SERVER[‘PHP_AUTH_USER’] and $_SERVER[‘PHP_AUTH_PW’] are working on my site.
    How can I resolve it?
    Thank you

    • This topic was modified 5 years, 5 months ago by wiloke.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Sorry, you cannot list resources.’ is closed to new replies.