• Resolved rebecca-paisley

    (@rebecca-paisley)


    Hi,

    We are trying to use the API built into WC. However, when we enter the URL string, it gives us the error that our oAuth signature is invalid. Do I need to generate this myself? If so, how?

    Or can I use the PHP library over on GitHub? If I can use this, where do I put it in my files? The root or theme?

    https://wordpress.org/plugins/woocommerce/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Mike Jolley (a11n)

    (@mikejolley)

    This should be covered in the authentication section here https://woothemes.github.io/woocommerce-rest-api-docs/#authentication

    You can use the PHP library – it would need to be included by your PHP code using the API.

    Thread Starter rebecca-paisley

    (@rebecca-paisley)

    Okay – the PHP Library on GitHub? I know the docs you are talking about (link), I just don’t understand where I am supposed to put the library and the php file that is making the calls to the API (i.e. get orders).

    Plugin Author Mike Jolley (a11n)

    (@mikejolley)

    Thread Starter rebecca-paisley

    (@rebecca-paisley)

    okay, but again —

    “I just don’t understand where I am supposed to put the library and the php file that is making the calls to the API (i.e. get orders).”

    Sorry to be a pain in the … But am I putting it in my theme’s functions.php ? Is it a standalone doc that can just go into the root of the site? Do I need to put it in the WooCommerce folder in my theme?

    Plugin Author Mike Jolley (a11n)

    (@mikejolley)

    Well it all depends on what you’re doing. Building a plugin? Building a theme? Building something standalone? The library is just PHP code – it just needs to be included (once) wherever the code using it is located.

    Thread Starter rebecca-paisley

    (@rebecca-paisley)

    Ahhh! Okay, okay. That makes much more sense!

    We are just using the WC API so a fulfillment company can see the orders that are processing.

    From the docs, it looked like all I needed to do was create the API to obtain the consumer secret and key and then setup the PHP wrapper for the oAuth library to work properly.

    My issue was (and I guess still is?) knowing where to put the files since we didn’t technically create a plugin or anything for it.

    Plugin Author Mike Jolley (a11n)

    (@mikejolley)

    If its for a 3rd party, **they** need to integrate with the REST API, not you. The API is how they will access the data.

    Thread Starter rebecca-paisley

    (@rebecca-paisley)

    Thank you so much for your help!!!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Invalid oAuth Signature’ is closed to new replies.