Monday, January 30, 2023
HomeWordPress Developmentwoocommerce offtopic - Auto producing API keys utilizing the Software Authentication Endpoint

woocommerce offtopic – Auto producing API keys utilizing the Software Authentication Endpoint


I’m making an attempt to auto generate API keys from a woocommerce web site , however I get an error like this :

identify:"FetchError"
message:"invalid json response physique at https:/...............
.............................cause: Sudden token < in JSON at place 0"
kind:"invalid-json"

that is the code I’ve used , i’ve modified web site names to pattern names :

  const store_url="https://pattern.com/";
            const endpoint="wc-auth/v1/authorize";
            const query_string = new URLSearchParams([
                ['app_name', 'MyShoppingWebsite'],
                ['scope', 'read_write'],
                ['user_id', '123'],
                ['return_url', 'https://example.com/apipractice'],
                ['callback_url', 'https://example.com/apipractice']
            ]).toString();
    const url = store_url + endpoint + '?' + query_string;

that is run from one other web site .
any assistance is appreciated , thanks !!

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments