2021年3月2日星期二

Error: Sorry, you are not allowed to create resources. [woocommerce_rest_cannot_create]

I tried to post a product using woocommerce rest API using Laravel, in basic authentication i'm using data from env (store url, consumer key, consumer secret). But i want it dynamic, so i get that 3 elements (store url, consumer key, consumer secret) from database. Fyi, i am make some form to post store url, consumer key, consumer secret into database. What i want to ask is when i use data from env for authentication post product there's no problem, but when i use data from database its show error like this: Error: Sorry, you are not allowed to create resources. [woocommerce_rest_cannot_create]. Anyone have a solution? i'm so confused, sorry for my bad english.

Screenshots: this is when i use 3 points for authenticate from env, no problem in this case when i use 3 points for authenticate with method like this (get from database), it will show error error like this if i use method in pict number 2

https://stackoverflow.com/questions/66451076/error-sorry-you-are-not-allowed-to-create-resources-woocommerce-rest-cannot March 03, 2021 at 01:04PM

没有评论:

发表评论