Title: JSON API User
Author: Ali Qureshi
Published: <strong>Ọ̀pẹ  3, 2013</strong>
Last modified: Agẹmọ  29, 2025

---

Ṣàwárí àwọn plugin

![](https://ps.w.org/json-api-user/assets/banner-772x250.png?rev=1965790)

![](https://ps.w.org/json-api-user/assets/icon-256x256.png?rev=1965790)

# JSON API User

 Láti ọwọ́ [Ali Qureshi](https://profiles.wordpress.org/parorrey/)

[Ṣe ìgbàsílẹ̀](https://downloads.wordpress.org/plugin/json-api-user.4.1.0.zip)

 * [Àwọn àlàyé](https://yor.wordpress.org/plugins/json-api-user/#description)
 * [Àwọn àgbéyẹ̀wò](https://yor.wordpress.org/plugins/json-api-user/#reviews)
 *  [Ìgbéwọlẹ̀](https://yor.wordpress.org/plugins/json-api-user/#installation)
 * [Ìdàgbàsókè](https://yor.wordpress.org/plugins/json-api-user/#developers)

 [Ìrànlọ́wọ́](https://wordpress.org/support/plugin/json-api-user/)

## Àpèjúwe

JSON API User extends the JSON API Plugin with a new Controller to allow RESTful
user registration, authentication, password reset, RESTful Facebook Login, RESTful
User Meta and BuddyPress xProfile get and update methods. This plugin is for WordPress/
Mobile app developers who want to use WordPress as mobile app data backend.

JSON API Plugin, that is required, was closed on August 7, 2019 from WordPress repository.
You can download [JSON API Plugin](https://github.com/PI-Media/json-api) from https://
github.com/PI-Media/json-api until it is republished and available on WordPress.

Features include:

 * Generate Auth Cookie for user authentication
 * Validate Auth Cookie
 * RESTful User Registration
 * RESTful Facebook Login/Registration with valid access_token
 * RESTful BuddyPress xProfile fields update
 * Get User Meta and xProfile fields
 * Update User Meta and xProfile fields
 * Delete User Meta
 * Password Reset
 * Get Avatar
 * Get User Info
 * Post Comment

The plugin was created for mobile apps integration with the web app using WordPress
as backend for all the data. WordPress helped in putting together the web app quickly
and then Mobile iOS and Android apps were integrated via this plugin. There were
some app specific customized methods which are not included but rest have been made
generic for community usage.

My other JSON API Auth plugin has also been integrated with this plugin from version
1.1 because most endpoints required user authentication via cookie for data update.

Pro Version Ìtumọ̀ Yorùbá: – JSON API User Plus

A pro version of this plugin, [JSON API User Plus](http://www.parorrey.com/solutions/json-api-user-plus/),
is available here http://www.parorrey.com/solutions/json-api-user-plus/ that supports
BuddyPress Messages component, BuddyPress avatar upload, BuddyPress Extended Profile,
BuddyPress Groups, BuddyPress Friends, BuddyPress Activity, BuddyPress Notifications,
BuddyPres Settings and other BuddyPress related functions to integrate BuddyPress
features in your mobile app via REST api.

[JSON API User Plus](http://www.parorrey.com/solutions/json-api-user-plus/) includes
API key which protects and restricts the endpoint calls. This key can be updated
from Settings > User Plus options page. Your app must include this key with every
call to get the data from REST API. Please see documentation for calling endpoints
examples for ‘JSON API User Plus’.

JSON API User Plus features include:

 * Generate Auth Cookie for user authentication
 * Validate Auth Cookie
 * RESTful User Registration
 * RESTful Facebook Login/Registration with valid access_token
 * RESTful BuddyPress xProfile fields update
 * Get User Meta and xProfile fields
 * Update User Meta and xProfile fields
 * Delete User Meta
 * Password Reset
 * Get/Upload Avatar
 * Get User Info
 * Post Comment
 * Add Post, Update Post, Delete Post
 * Add/Edit/Delete Custom Post Type, Custom Fields
 * Search User
 * BuddyPress Activities
 * BuddyPress Members
 * BuddyPress Friends
 * BuddyPress Notifications
 * BuddyPress Settings
 * & many more

## Àwọn àwòrán ìbòjú

 * [[
 * Call to generate_auth_cookie endpoint using Postman
 * [[
 * Call to get_currentuserinfo endpoint using Postman
 * [[
 * Call to validate_auth_cookie endpoint using Postman

## Ìgbéwọlẹ̀

First you have to install the JSON API for WordPress Plugin (https://wordpress.org/
extend/plugins/json-api/installation/).

To install JSON API User just follow these steps:

 * Upload the folder “json-api-user” to your WordPress plugin folder (/wp-content/
   plugins)
 * Activate the plugin through the ‘Plugins’ menu in WordPress or by using the link
   provided by the plugin installer
 * Activate the controller through the JSON API menu found in the WordPress admin
   center (Settings -> JSON API)

## FAQ

 * There are following methods available: register, get_avatar, get_userinfo, retrieve_password,
   validate_auth_cookie, generate_auth_cookie, get_currentuserinfo, get_user_meta,
   update_user_meta, delete_user_meta, xprofile, xprofile_update, fb_connect
 * nonce can be created by calling if you are registering user. http://localhost/
   api/get_nonce/?controller=user&method=register
 * You can then use ‘nonce’ value to register user.
 * Always use POST method and not GET method to submit data, following url examples
   of GET method are only for demonstration purposes.

### Method: info

http://localhost/api/user/info/

This returns plugin version.

### Method: register

http://localhost/api/user/register/?username=john&email=john@domain.com&nonce=8bdfeb4e16&
display_name=John&notify=both

To register user & get valid cookie for 100 seconds:
 http://localhost/api/user/
register/?username=john&email=john@domain.com&display_name=John&notify=both&seconds
=100

Optional fields: ‘user_pass’, ‘user_nicename’, ‘user_url’, ‘nickname’, ‘first_name’,‘
last_name’, ‘description’, ‘rich_editing’, ‘user_registered’, ‘jabber’, ‘aim’, ‘
yim’, ‘comment_shortcuts’, ‘admin_color’, ‘use_ssl’, ‘show_admin_bar_front’.

Please make sure you provide valid values that these fields expect in correct format.

To disbale registration email notification to user:

http://localhost/api/user/register/?username=john&email=john@domain.com&nonce=8bdfeb4e16&
display_name=John&notify=no

To register with user provided password:

http://localhost/api/user/register/?username=john&email=john@domain.com&nonce=8bdfeb4e16&
display_name=John&notify=both&user_pass=YOUR-PASSWORD

To add custom fields for user profile, send ‘custom_fields’ named associative array,
populated with standard ‘meta_key’ as index and ‘meta_value’ as its value. For example,
you need to add address and phone for any user, populate custom_fields[address] 
index with address value and custom_fields[phone] with hpone value.

You can add any number of custom fields. These are stored as meta_key and meta_value
in user_meta WordPress table. You can access these values in WordPress using get_user_meta()
fucntion.

You can also get these values with get_user_meta endpoint, see below this endpoint
documentation.

### Method: fb_connect

It needs valid ‘access_token’ var.

http://localhost/api/user/fb_connect/?access_token=CAACEdEose0cBADLKmcHWOZCnW4RGU8emG

Provide valid access_token with email extended permission. To generate test access_token,
try this tool https://developers.facebook.com/tools/explorer/ and select the app
from above drop down that you want to get access_token (You must have joined that
app already with email permission to generate access_token) for and then select 
email from the fields. By default, only ‘id’ and ‘name’ are added but you need to
include ’email’ for user identification.

You will have to first allow extended permission for email in the app joining screen.
Please note that above tool is only for testing, you generate valid access_token
using the Graph API in your app. You should know Facebook Graph API to use this 
endpoint.

### Method: validate_auth_cookie

It needs ‘cookie’ var.

http://localhost/api/user/validate_auth_cookie/?cookie=admin|43089754375034fjwfn39u8

### Method: generate_auth_cookie

It needs `username`, `password` vars. `seconds` is optional.

First get the nonce: http://localhost/api/get_nonce/?controller=user&method=generate_auth_cookie

Then generate cookie: http://localhost/api/user/generate_auth_cookie/?username=john&
password=PASSWORD-HERE

Optional ‘seconds’ var. It provided, generated cookie will be valid for that many
seconds, otherwise default is for 14 days.

generate cookie for 1 minute: http://localhost/api/user/generate_auth_cookie/?username
=john&password=PASSWORD-HERE&seconds=60

60 means 1 minute.

### Method: delete_user_meta

It needs ‘cookie’ and ‘meta_key’ var and ‘meta_value’ to delete.

http://localhost/api/user/delete_user_meta/?cookie=COOKIE-HERE&meta_key=KEY-HERE&
meta_value=VALUE-HERE

### Method: update_user_meta

It needs ‘cookie’ and ‘meta_key’ var and ‘meta_value’ to update. You must include
a ‘meta_value’ var in your request. If you have multiple values for any meta_key,
you must send it as an array meta_value[] in POST method.

http://localhost/api/user/update_user_meta/?cookie=COOKIE-HERE&meta_key=KEY-HERE&
meta_value=VALUE-HERE

### Method: update_user_meta_vars

It needs ‘cookie’ and any user meta variables. This endpoint allows you cut http
requests if you have to add/update more than one user_meta field at a time.

http://localhost/api/user/update_user_meta_vars/

In the above endpoint use custom_fields[‘website’]=domain.com, custom_fields[‘city’]
=NYC, custom_fields[‘country’]=USA as meta_key for WordPress user_meta values using
POST method.

If you have multiple values for any variable, you must send it as an array i.e. 
variable_name[] in POST method. For instance, you have skills variable with multiple
values, you will send a custom_fields[‘skills’][] array with its values using POST
method.

### Method: get_user_meta

It needs ‘user_id’. ‘meta_key’ var is optional.

http://localhost/api/user/get_user_meta/?cookie=COOKIE-HERE&meta_key=KEY-HERE

### Method: xprofile

It needs ‘user_id’ and any profile ‘field’ var.

http://localhost/api/user/xprofile/?user_id=USERID-HERE&field=FIELD-LABEL-HERE

### Method: xprofile_update

It needs ‘cookie’ and any profile ‘field’ var and ‘value’.

http://localhost/api/user/xprofile_update/?cookie=COOKIE-HERE&exact-xprofile-field-
label=value

http://localhost/api/user/xprofile_update/?cookie=COOKIE-HERE&field=value&field2
=value&multi-value-field=value1,value2,value3

Please make sure you provide ending comma for all those fields which have multiple
values. e.g. If ‘skills’ xProfile field has multiple values, pass them like
 http://
localhost/api/user/xprofile_update/?cookie=COOKIE-HERE&skills=PHP,MySQL, or &skills
=PHP, make sure you always pass ending comma for multi-select fields to be added
in array format.

### Method: retrieve_password

It needs user_login var.

http://localhost/api/user/retrieve_password/?user_login=john

### Method: get_avatar

It needs user_id var.

http://localhost/api/user/get_avatar/?user_id=1

### Method: get_userinfo

It needs user_id var.

http://localhost/api/user/get_userinfo/?user_id=1

### Method: post_comment

It needs ‘cookie’, ‘post_id’, ‘content’, ‘comment_status’ vars.

http://localhost/api/user/post_comment/?cookie=COOKIE-HERE&post_id=ID&content=Comment
contents here&comment_status=1

For additional endpoints, pro version JSON API User Plus plugin details check here
https://www.parorrey.com/solutions/json-api-user-plus/

## Àwọn àgbéyẹ̀wò

![](https://secure.gravatar.com/avatar/1989c2fad1e2bb349518fdb1a4b4906e5a203f9b728b5174566c2ab4e5fc03e7?
s=60&d=retro&r=g)

### 󠀁[Reset password donÌtumọ̀ Yorùbá: ’t work](https://wordpress.org/support/topic/reset-password-dont-work-2/)󠁿

 [evgentret](https://profiles.wordpress.org/evgentret/) Ṣẹrẹ 22, 2025 1 ìdáhùn

Sending email without link.Plugin used own api system, that obsolete

![](https://secure.gravatar.com/avatar/9138d34324795a2dcb7fb67de87ebe66de2ea03bab24117817fbda5f94a162ce?
s=60&d=retro&r=g)

### 󠀁[Rubish](https://wordpress.org/support/topic/dump-3/)󠁿

 [Andrey](https://profiles.wordpress.org/guitmann/) Ògún 27, 2021

Dont work

![](https://secure.gravatar.com/avatar/0fbdecdb651674efcf6fd60d31d89c2ad20782d990cdee085c5f497e5e9af002?
s=60&d=retro&r=g)

### 󠀁[Waste of time](https://wordpress.org/support/topic/waste-of-time-241/)󠁿

 [HectaCon](https://profiles.wordpress.org/hectacon/) Agẹmọ 14, 2020 1 ìdáhùn

Waste of time and misleading

![](https://secure.gravatar.com/avatar/add84f86dab20b2d875892f4eb83c4eaf21fcb73540ea7b55d8713da76b0e329?
s=60&d=retro&r=g)

### 󠀁[super nice](https://wordpress.org/support/topic/super-nice-11/)󠁿

 [job](https://profiles.wordpress.org/jobmoll/) Ṣẹrẹ 25, 2020

Saves a lot of time!

![](https://secure.gravatar.com/avatar/0d53f1d323210da5fa061fb667c8c0f933a993db386e91418ecf83f1217eb502?
s=60&d=retro&r=g)

### 󠀁[Great plugin](https://wordpress.org/support/topic/great-plugin-21407/)󠁿

 [proeyes](https://profiles.wordpress.org/proeyes/) Igbe 3, 2019

Many thanks for this plugin is done my job quickly.

![](https://secure.gravatar.com/avatar/6dc7ac768874c050192665ae7812a8d0e208c092a49458e900b1227605730dbc?
s=60&d=retro&r=g)

### 󠀁[Perfect](https://wordpress.org/support/topic/perfect-4720/)󠁿

 [danilopaulinodasilva](https://profiles.wordpress.org/danilopaulinodasilva/) Ṣẹrẹ
12, 2018

Really great plug-in

 [ Ka gbogbo àwọn àgbéyẹ̀wò 21 ](https://wordpress.org/support/plugin/json-api-user/reviews/)

## Àwọn Olùkópa & Olùgbéejáde

“JSON API User” jẹ́ ètò ìṣàmúlò orísun ṣíṣí sílẹ̀. Àwọn ènìyàn wọ̀nyí ti ṣe ìkópa
sí plugin yìí.

Àwọn Olùkópa

 *   [ Ali Qureshi ](https://profiles.wordpress.org/parorrey/)

[Túmọ̀ “JSON API User” sí èdè rẹ.](https://translate.wordpress.org/projects/wp-plugins/json-api-user)

### Ṣe o nífẹ̀ẹ́ sí ìdàgbàsókè?

[Ṣàwárí koodu](https://plugins.trac.wordpress.org/browser/json-api-user/), ṣàyẹ̀wò
[ibi ìpamọ́ SVN](https://plugins.svn.wordpress.org/json-api-user/), tàbí ṣe àgbékalẹ̀
sí [àkọsílẹ̀ ìdàgbàsókè](https://plugins.trac.wordpress.org/log/json-api-user/) 
nípasẹ̀ [RSS](https://plugins.trac.wordpress.org/log/json-api-user/?limit=100&mode=stop_on_copy&format=rss).

## Àkọsílẹ̀ àwọn àyípadà

#### 4.1.0

 * For new version of WordPress 6.8

#### 4.0.0

 * bug fix for array, for new version of WordPress 6.6.2

#### 3.9.9

 * for new version of WordPress 6.6.1

#### 3.9.8

 * fixed security vulnerabilities & for new version of WordPress 6.6.1

#### 3.9.7

 * fixed security vulnerabilities

#### 3.9.6

 * fixed security vulnerabilities & for new version of WordPress 6.6

#### 3.9.5

 * fixed readme file.

#### 3.9.4

 * fixed security vulnerabilities & for new version of WordPress 6.6

#### 3.9.3

 * Fixed a bug for get_userinfo, generate_auth_cookie, get_currentuserinfo endpoints
   for avatar

#### 3.9.2

 * Fixed a bug for validate_auth_cookie endpoint and error message

#### 3.9.1

 * Updated for wordpress version 6.1.1

#### 3.9.0

 * Updated for wordpress version 6.0.1, bug fix for generate_auth_cookie endpoint

#### 3.8.1

 * Updated for wordpress version 5.9

#### 3.8.0

 * Updated for wordpress version 5.8

#### 3.7.0

 * Updated for wordpress version 5.7.

#### 3.6.0

 * Updated for wordpress version.

#### 3.5.0

 * Updated update_user_meta endpoint for array variable values.
 * Updated update_user_meta_vars endpoint for array variable values.

#### 3.4.0

 * Updated for hash cookie in response to register endpoint.
 * Added ‘custom_fields’ for user profile register endpoint, ‘custom_fields’ named
   array with ‘meta_key’ and ‘meta_value’ will be added in user profile.

#### 3.3.0

 * Updated for hash cookie in response to generate_auth_cookie endpoint.
 * Updated and included cookie, cookie name, hashed cookie and user_login info in
   response to registration endpoint.
 * ‘display_name’ variable is not required anymore in ‘regstration’ endpoint.

#### 3.2.0

 * Updated for JSON API Plugin diretory check error and updated action links.

#### 3.1.3

 * Fixed action links

## Àkójọpọ̀ Meta

 *  Ẹ̀yà **4.1.0**
 *  Ìgbàgbọ́hùn tó kẹ́yìn **oṣù 9 sẹ́yìn**
 *  Àwọn ìgbéwọlẹ̀ tó ṣiṣẹ́ **1,000+**
 *  Ẹ̀yà WordPress ** 3.0.1 tàbí ju bẹ́ẹ̀ lọ **
 *  Dánwò dé **6.8.5**
 *  Ẹ̀yà PHP ** 5.3 tàbí ju bẹ́ẹ̀ lọ **
 *  Èdè
 * [English (US)](https://wordpress.org/plugins/json-api-user/)
 * Àwọn àmì
 * [authentication](https://yor.wordpress.org/plugins/tags/authentication/)[json api](https://yor.wordpress.org/plugins/tags/json-api/)
 *  [Ìwòye Tó Péye](https://yor.wordpress.org/plugins/json-api-user/advanced/)

## Àwọn ìbò

 3.9 lára àwọn ìràwọ̀ 5.

 *  [  14 5-star reviews     ](https://wordpress.org/support/plugin/json-api-user/reviews/?filter=5)
 *  [  1 4-star review     ](https://wordpress.org/support/plugin/json-api-user/reviews/?filter=4)
 *  [  1 3-star review     ](https://wordpress.org/support/plugin/json-api-user/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/json-api-user/reviews/?filter=2)
 *  [  5 1-star reviews     ](https://wordpress.org/support/plugin/json-api-user/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/json-api-user/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/json-api-user/reviews/)

## Àwọn Olùkópa

 *   [ Ali Qureshi ](https://profiles.wordpress.org/parorrey/)

## Ìrànlọ́wọ́

Nǹkan wà tí o fẹ́ sọ? Ṣé o nílò ìrànlọ́wọ́?

 [Wo àpéjọ ìrànlọ́wọ́](https://wordpress.org/support/plugin/json-api-user/)

## Ṣe ìtọrẹ

Ṣé o fẹ́ ṣe àtìlẹ́yìn fún ìlọsíwájú plugin yìí?

 [ Ṣe ìtọrẹ sí plugin yìí ](http://www.parorrey.com/solutions/json-api-user-plus/)