• Resolved hamiedwp

    (@hamiedwp)


    Hi,
    I programmed wcfm rest api, creating product worked fine, but updating product is not work, I got error:
    {“code”:”rest_forbidden”,”message”:”Sorry, you are not allowed to do that.”,”data”:{“status”:403}}

    Help!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter hamiedwp

    (@hamiedwp)

    Can I use another command instead of PUT, because we are on shared hosting.

    Plugin Author WC Lovers

    (@wclovers)

    Hello,
    No update option is done by PUT requests. Create option is done by POST request. This is the standard procedure. If you gant you can create your own rest route to modify the requests but our plugin is built on the standard procedures.

    Thread Starter hamiedwp

    (@hamiedwp)

    I mean I got that error when i request product update:
    https://wclovers.github.io/wcfm-rest-api/?php#update-a-product

    How can I solve?

    Plugin Author WC Lovers

    (@wclovers)

    Hello,
    If your server doesn’t support PUT request you will not able to do do the update product.
    As you see the create product is working fine that meas the api is working fine but as your server is not supporting PUT request the update product is getting the error.

    Thread Starter hamiedwp

    (@hamiedwp)

    PUT request is not supported with almost of shared webhosting!
    Can I change PUT to POST in product update?

    Plugin Author WC Lovers

    (@wclovers)

    Hello,
    We are also using shared hosting in 2 of our demo servers. The PUT request is working fine in both of them. Moreover you can check Woocommerce api also the also use PUT request for update requests. It is the standard practice.
    If you want to do the update by POST requests you need to clone our api and create a new api of your own. Because in our api request the update process is done by PUT request only.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘403 rest forbidden on update product’ is closed to new replies.