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 !!