Rest API and Custom User Meta?

652 views
Skip to first unread message

Toby Cryns

unread,
Aug 5, 2015, 9:33:06 PM8/5/15
to Minneapolis St. Paul WordPress User Group
Does anyone know if it's possible to pull WP usermeta out via the new WP Rest API? (http://wp-api.org/)  I have a custom meta_key (encoded as a json string) attached to each user in the "wp_usermeta" table (see attached screengrab), and I would like to pull that out via the Rest API.  Is that possible?



Thanks in advance for your help!
Toby


Nick Ciske

unread,
Aug 6, 2015, 7:24:03 AM8/6/15
to mpls-stpau...@googlegroups.com
It's not in the core plugin yet:


But it looks like you can add your field to the user/view endpoint response with a hook:


Or try this plugin, but reviews are mixed and it feels like a sledgehammer/nail situation:

Nick Ciske
@nciske
Sent from my iPhone

Toby Cryns

unread,
Aug 8, 2015, 9:18:21 AM8/8/15
to Minneapolis St. Paul WordPress User Group
Thanks for sharing these links, Nick!

Toby
Reply all
Reply to author
Forward
0 new messages