Title: rest_application_password_collect_status
Published: December 9, 2020
Last modified: August 20, 2026

---

# rest_application_password_collect_status( WP_Error $user_or_error, array $app_password = array() )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/functions/rest_application_password_collect_status/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/functions/rest_application_password_collect_status/?output_format=md#source)
 * [Changelog](https://developer.wordpress.org/reference/functions/rest_application_password_collect_status/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/functions/rest_application_password_collect_status/?output_format=md#wp--skip-link--target)

Collects the status of authenticating with an application password.

## 󠀁[Parameters](https://developer.wordpress.org/reference/functions/rest_application_password_collect_status/?output_format=md#parameters)󠁿

 `$user_or_error`[WP_Error](https://developer.wordpress.org/reference/classes/wp_error/)
required

The authenticated user or error instance.

`$app_password`arrayoptional

The Application Password used to authenticate.

Default:`array()`

## 󠀁[Source](https://developer.wordpress.org/reference/functions/rest_application_password_collect_status/?output_format=md#source)󠁿

    ```php
    function rest_application_password_collect_status( $user_or_error, $app_password = array() ) {
    	global $wp_rest_application_password_status, $wp_rest_application_password_uuid;

    	$wp_rest_application_password_status = $user_or_error;

    	if ( empty( $app_password['uuid'] ) ) {
    		$wp_rest_application_password_uuid = null;
    	} else {
    		$wp_rest_application_password_uuid = $app_password['uuid'];
    	}
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/rest-api.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.1/src/wp-includes/rest-api.php#L1210)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api.php#L1210-L1220)

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/rest_application_password_collect_status/?output_format=md#changelog)󠁿

| Version | Description | 
| [5.7.0](https://developer.wordpress.org/reference/since/5.7.0/) | Added the `$app_password` parameter. | 
| [5.6.0](https://developer.wordpress.org/reference/since/5.6.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Frest_application_password_collect_status%2F)
before being able to contribute a note or feedback.