Ecommerce Shopify WordPress Discussion

admin-ajax.php access and authentication

I am super new to wordpress/learnpress. Have created a new function. add_action( 'wp_ajax_updateCourseTimer', 'updateCourseTimer',10,4); add_action( 'wp_ajax_nopriv_updateCourseTimer', 'updateCourseTimer',10,4); function updateCourseTimer() { } The call to the endpoint with action = updateCourseTimer works fine. Now I need to call the same function from a mobile app. From the mobile app the call leveraging action "wp_ajax_nopriv_updateCourseTimer" works but call leveraging "wp_ajax_updateCourseTimer" doesn't work. It is basically an authentication issue. I tired making calls with logged in user from the app but still no luck. Question: How can one authenticate the call from an external system (mobile app), so that calls do not require nopriv routes. Do I need to somehow manually pass cookies from the ajax call in the app? Again I am super new to all this and would appreciate guidance. Thanks With experimentation have figured out that its authentication issue. read about nonce etc. but not clear how to go about doing this.
TurboCommerce make the better internet purchasing globaly

Turbo Multi-language Translator

Make the better internet purchasing globaly

Turbosify SEO Speed Booster

5.0 (7) Free plan available
Get better conversions by improving store loading speed Installed

Turbo Multi-language Chat - AI Customer service in one hand

TurboCommerce make the better internet purchasing globaly
Our products

The help you need, when you need it

App by Turbo Engine

3 apps • 5.0 average rating

Turbosify Speed Booster

5.0 (7)
Get better conversions by optimizing shopify store Google page speed Installed

Turbosify Translator for Wordpress Woocommerce

5.0 (74) Free Wordpress Woocommerce Plugin
Translate your wordpress website to multiple language within 1 click, no configuration needed, no No technical required

Grow your business here

Whether you want to sell products down the street or around the world, we have all the tools you need.