Since you’re using a JWT for the current user (that is logged into WordPress), you can use this endpoint:
/wp/v2/users/me
https://developer.wordpress.org/rest-api/reference/users/#retrieve-a-user-2
You can also check the token to see what claims are available at https://jwt.ms
Related Posts:
- How can I get users email (and additional data) from the rest API?
- Rest API code to get ID of current user not working: get_current_user_id() gives 0
- Getting user data via ajax
- REST_query_vars for users
- user_login vs. user_nicename
- get_user_meta() doesn’t include user email?
- How to display custom user meta from registration in backend?
- Allowing an email as the username?
- Grouping users under parent user
- How to create a template for a custom URI associated with the user
- Extending WP_User class and using this sub-class during the whole lifecycle
- Basic auth WordPress REST API dilemma
- How we can get the user id by its display_name
- WP_User_Query with combined meta query – not working?
- LEFT JOIN, INNER OUTER JOIN, LEFT OUTER JOIN is driving me crazy. Please help?
- Show Biographical Info while creating new user
- How to add follow functionality to multi-author wordpress site?
- Search multiple meta keys at once
- Querying Email Addresses for a List of Users with Same Last Name?
- ACF Upload Image in front-end with custom form
- Hide a user from WordPress
- Check for user meta data at Login
- How to add country drop down menu to the user profile?
- Delete user from frontend
- Add custom fields to the user profile
- Memory usage for scalable usermeta queries
- stop login if user_status equal zero
- WP User Query fails when searching meta queries and search columns
- Log all users out of all locations after 24 hours
- How can i create an array user meta?
- User Last Login Sort Column
- Updating user meta
- WordPress User Meta & ChromePHP or other way to debug/view php variables
- Are User Levels Still Currently Used?
- mysql query two database tables, users and usermeta and sort by custom meta int value
- WordPress API for search
- Should I encrypt the response that triggers an Ajax action? Is nonce sufficient?
- User Meta Data in a Sortable Table
- get_user_meta an ID for multiple functions
- Is there a way to identify a user in a custom REST API method? [duplicate]
- How can I authenticate user credentials against a WordPress instance?
- Rest api return all users (even without content) to all users
- Column Sorting Code on users.php
- Creating user without username and password
- List users by meta_key and meta_value
- Is this code true or not
- users and usermeta table
- WordPress SQL Issue not returning correct reselts
- User description only displayed for logged user
- The Simple and Correct Way to Add User Meta
- “the_author_meta(‘url’)” not working inside “href”
- REST API: wp_get_current_user not working on second call
- Assign random (and unique) user meta upon registration
- Display the line breaks in user bio without using html
- how to set default update_user_meta values wordpress
- Get user by meta key – WP multi site
- Add custom user meta data
- Cannot Update user meta in custom field
- WordPress /users/me endpoint request forbidden
- How to add an attribute to a user?
- Adding fields to the “Add New User” but the form data not saved into DB
- New User Save Filter
- SELECT from wp_users, get Displayname too
- Assigning multiple or additional capabilities to specific users or how to create additional roles like bbpress roles?
- What does “link” refer to when you delete a user?
- delete_user_meta from a foreach results page
- How to verify which WordPress user requested the API in ASP .NET Core?
- Need to use WordPress page as authentication for different service
- Reading additional fields in PMPro
- Is there a way to call via javascript if a user is logged-in on a static html file?
- Can I add a unique code for each user based on the location?
- change user password REST API
- How to customize user rest api?
- The same session information for peer users on two different WordPress servers
- Hook into add_user_role and update based on new and removed roles
- How to update a user with REST API v2 knowing only the username?
- Safely changing UserID’s, re-using deleted UserID’s and automatically using deleted userID’s instead of an increment
- In admin manage users page, how can I stop users with certain privileges from editing users with other privileges?
- Get meta key with value for user
- user and usermeta table not found
- UserMeta Changes Meta Value for Post ID
- How do I change the user via SQL?
- Add method for tracking who referred new users
- Username has been exposed
- User list order by user meta
- User management missing after migration to new host
- Validate user meta and redirect
- Let admin users edit member profiles from front end
- Does WordPress Need BuddyPress to Handle Large Amounts of Users?
- Using and saving custom dropdown boxes on user profiles
- Store subscription details for users in WordPress
- Problem with update_user_meta() meta_value
- Why does a super admin on multi site get a rest_user_invalid_id error code when requesting user details through REST?
- How to add custom detail page for a Subscriber at Admin Panel
- Add custom input field in new user page
- WordPress – Security Question at Login from User’s Meta Data
- MySQL query to list users who never signed in
- Recognize logged WP user in existing REST API
- Export user data from Squirrly’s Starbox plugin?
- Can’t retrieve user email address with REST API