Enabling REST API problem
-
Hello,
I am co-operating with a company to import products through my REST API.
They are reporting a problem and telling me I should contact WooCommerce support. This is their message after trying to access the REST API:
—
Hi,
Apologies!! We’re still getting the error “Response Code: 200” while testing the connection with your store. Please note, this error is not related to us. This is something coming directly from your store end.
It might be due to some invalid plugin installed on your Woocommerce store admin or it might be some permission issue on your store end. We can’t log in on your store admin and fix the issue from our end.
This is something that needs to fix either by the store developer or hosting team or Woocommerce support.
it seems Rest API is not enabled on your Woocommerce server. The URL (wp-json) does not show garbled data. Please reach out to your hosting team and ask them to enable the rest API on your Woocommerce server. Once they enabled it, you can verify by clicking the (wp-json) URL and it will show the garbled data as below:
Message Body:
Unknown response from request : 200 : exception : Unexpected character (‘<‘ (code 60)): expected a valid value (JSON String, Number, Array, Object or token ‘null’, ‘true’ or ‘false’) at [Source: (StringReader); line: 1, column: 2]
com.fasterxml.jackson.core.JsonParseException: Unexpected character (‘<‘ (code 60)): expected a valid value (JSON String, Number, Array, Object or token ‘null’, ‘true’ or ‘false’) at [Source: (StringReader); line: 1, column: 2]
Response Code: 200
—
I have enabled the REST API and Legacy API from WooCommerce settings. Per these instructions:
—
A. In the left side panel of admin dashboard, Go to Plugins and then click “Installed Plugins” in the dropdown menu.
DeepinScreenshot_select-area_20190730135128.png?version=1&modificationDate=1564475692785&cacheVersion=1&api=v2&width=650&height=324
B. Click the “Settings” link under WooCommerce Plugin.
C. Click on the ‘Advanced tab.
D. Click on “Rest API”
E. Click on “Add Key”
F. Here you can put anything in “description” and “User” but set “permission” as “Read/Write”. This permission is required to run the automation updates of the selected supplier for the website.
G. Then click on the “Generate API Key” button.
H. Once the keys are generated we can proceed further and set up automation service.
—
I am really desperate as no one can help me, i would appreciate your assistance in this.
Thank you.The page I need help with: [log in to see the link]
- The topic ‘Enabling REST API problem’ is closed to new replies.