Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

219
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda