Auto generating API keys using the Application Authentication Endpoint
-
I am trying to auto generate API keys from a woocommerce website , but I am getting an error like this :
name:"FetchError" message:"invalid json response body at https:/............... .............................reason: Unexpected token < in JSON at position 0" type:"invalid-json" this is the code I have used , i have changed website names to sample names : const store_url = 'https://sample.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; this is run from another website . any help is appreciated , thank you !!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Auto generating API keys using the Application Authentication Endpoint’ is closed to new replies.