Skip to content
Read For Learn
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP

Programmatic Login from 3rd Party site

From what I can tell, what I was trying to do is not possible.

The cURL request never actually touches the browser, it goes from the web app server to the wordpress site server so there in that context the web app server is the client. So when the redirect happens, the cookie is not set in the browser.

What I’ve done instead is a GET request passing my tokenized values in the query string. It’s not as secure this way as anyone who gets their hands on the token will technically be able to access the site and login but there doesn’t appear to be a way around that. At least the tokenized URL is never actually visible in the address bar so the typical user will not know what’s happening.

Related Posts:

  1. Changing user_nicename
  2. automated tests as a user?
  3. Creating login session via CURL
  4. User management system similar to wordpress one?
  5. Change CSS based on is_user_logged_in
  6. Admin Panel 404 Error after login
  7. How to block specific user id in custom login form?
  8. Call WP Rest-Api to GET /users/me returned NOTHING in console
  9. is_user_logged_in() not working in homepage
  10. List users in a dropdown for login
  11. rest_cannot_create_user – Sorry, you are not allowed to create new users. CURL WORDPRESS REST API
  12. change Dashboard default page on login
  13. add_cap not working
  14. Do not execute If User is login as Administrator or any Specific Role
  15. get post content of particular post by url
  16. wordpress archive a user
  17. Problem with login form
  18. Best practice for show data to one specific user?
  19. Login to wordpress by clicking a link and specifying usernaname and password in url
  20. Call to undefined function get_userdata() in plugin
  21. WordPress from url get external source title
  22. Log in / Log Out Custom Button
  23. Should `wp_login` be used since it’s deprecated?
  24. How to redirect users based on role and content of redirect_to?
  25. get_users meta_query: REGEXP not working for matching new lines
  26. How to display login form anywhere, when user isn’t logged in, without redirecting?
  27. How to show a users bio on a page
  28. How can I open up my administrative panel to everyone?
  29. “operation successful” message
  30. php if username is role
  31. How do you create two separate Register pages?
  32. Is it possible to create new user from external form using REST API?
  33. Foreach loop inside an array_merge
  34. How can I add a new row in a separate database when someone registers via WordPress?
  35. WordPress transient not working with WP Engine
  36. Show current user posts only
  37. How to send a HTTP Post request using PHP Curl and WordPress
  38. One account with multiple logins
  39. Change page password every day (predictable password ;) )
  40. Lost in trying to create user database system
  41. SOAP Request/Parsing XML From wp_send_json_success
  42. show something only when user comes from specific page at remote host?
  43. Get the users that my following users are following
  44. REST API works in browser and via AJAX but fails via cURL
  45. create front-end users post list by specific category
  46. Shortcode to log user into current URL
  47. cURL error 6 on news area, and also won’t auto update
  48. Show site content based on user role
  49. PHP getting error when trying to access WP-Admin Dashboard
  50. ‘pre_user_query’ interfering with user export
  51. I installed WordPress locally now how do I login?
  52. Post to WordPress from another Server via PHP
  53. If user is logged in not working
  54. Change homepage content if user is logged in – BuddyPress
  55. php return username of currently viewed author profile
  56. Accessing an API with jQuery and AJAX
  57. Show login greeting above sub-menu links?
  58. How to list users like an archive page 10 users on page and have navigations
  59. calling admin-ajax.php from admin-ajax.php
  60. How can I call a specific file (via php) by referencing the logged-in username?
  61. Redirect to current user page upon link click
  62. is_user_logged_in returning nothing on custom page
  63. Use of antispambot with $curauth->email
  64. Uses for function: wp_update_user
  65. Display additional user fields
  66. Help with accessing wp-admin page and resolving error messages
  67. Generate a QR code when creating a new WordPress user
  68. Removing “There is no account with that username or email address.” error message in “/wp-login.php?action=lostpassword”
  69. Change wordpress’ database data using ajax – how to get current user id?
  70. Sort new column in Users wp-admin
  71. Sort column in Users admin Tab
  72. Can’t log in to WordPress wp-admin after adding code to functions.php
  73. Allow a user or role to view drafts and previews, but not other admin privileges?
  74. Woocommerce display orders with products from specific categories to specific admins
  75. Storing huge number of users in wordpress
  76. Check if user had autologin & if so, logout
  77. PHP warning – Use of undefined constant ‘FORCE_SSL_LOGIN’ ‘FORCE_SSL_ADMIN’ on wp-config.php
  78. Get current user id in function php
  79. Log out without confirmation request (nonce)
  80. How to count active users on a specific page
  81. how can I call a function when time expire
  82. Hide Approved status for certain users in users list
  83. Having trouble creating two shortcodes, one for logged in user and one for visitors
  84. Uploading/integrating custom user registration page
  85. If user has clicked link add class and store using PHP/WordPress
  86. Restrict wordpress access to logged users only
  87. Infinite loop when logging out using custom login form
  88. Menu not updating for logged in users after redirect
  89. Store data from JavaScript object to custom table in user account
  90. Export WordPress User Meta to CSV/Excel
  91. how to use auth_redirect() redirect visitor to login page if they are not login when they click account and order page?
  92. Issues adding Recaptcha v3 to WordPress Registration
  93. Page template not working when logged out
  94. Display specific page if user signed in
  95. Allow specific user to edit a specific page
  96. How to change the value of a variable using input field?
  97. Display current user metadata on WordPress page
  98. Change Login or Logout text based on status
  99. How do I track which user clicked my button?
  100. Refresh page after login with litespeed cache
Categories PHP Tags curl, login, php, users
Prevent update of custom user profile meta field on the front end after 1st entry
Woocommerce REST API allow normal users make an order

Recommended Hostings

Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.

FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.

Recent Added Topics

  • Bug in translation system: load_theme_textdomain() returns true, files are available and accessible but the language defaults to english
  • Post Navigation Elementor
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • WPFacet multiple loop displaying duplicate content
  • Get the name of the template/*html file used
  • Fix: WordPress.DB.PreparedSQL.NotPrepared Plugin Check (PCP)
  • Removing unnecessary CSS and JS code from wp_head()
  • hexagonal image gallery. Am I on the right track? [closed]
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
© 2026 Read For Learn
  • Database
    • Oracle
    • SQL
  • algorithm
  • asp.net
  • assembly
  • binary
  • c#
  • Git
  • hex
  • HTML
  • iOS
  • language angnostic
  • math
  • matlab
  • Tips & Trick
  • Tools
  • windows
  • C
  • C++
  • Java
  • javascript
  • Python
  • R
  • Java Script
  • jQuery
  • PHP
  • WordPress