Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

221
Views
How can I get the current user id in wordpress by making an ajax request from the website's front end (built in react on the same domain)

I have a wordpress website where react is used for all the front end components. I need to somehow fetch the currently logged-in user's id using the wordpress REST API via an ajax request. The request to the REST API needs to be authenticated in order to get this information but not sure how without the user's credentials in the first place.

Thanks in advance.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You can fetch a list of all the users using the Wordpress Rest api and then filter the result of a particular user based on your criteria.

Ref:- Fetch all users

Alternatively, You can fetch current user using this endpoint from the rest API provided by wordpress.

Ref:- Fetch current user

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!