Title: WP_REST_Application_Passwords_Controller::__construct
Published: December 9, 2020
Last modified: May 20, 2026

---

# WP_REST_Application_Passwords_Controller::__construct()

## In this article

 * [Source](https://developer.wordpress.org/reference/classes/wp_rest_application_passwords_controller/__construct/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/classes/wp_rest_application_passwords_controller/__construct/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/classes/wp_rest_application_passwords_controller/__construct/?output_format=md#changelog)

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

Application Passwords controller constructor.

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

    ```php
    public function __construct() {
    	$this->namespace = 'wp/v2';
    	$this->rest_base = 'users/(?P<user_id>(?:[\d]+|me))/application-passwords';
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/rest-api/endpoints/class-wp-rest-application-passwords-controller.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-includes/rest-api/endpoints/class-wp-rest-application-passwords-controller.php#L24)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/rest-api/endpoints/class-wp-rest-application-passwords-controller.php#L24-L27)

## 󠀁[Related](https://developer.wordpress.org/reference/classes/wp_rest_application_passwords_controller/__construct/?output_format=md#related)󠁿

| Used by | Description | 
| [create_initial_rest_routes()](https://developer.wordpress.org/reference/functions/create_initial_rest_routes/)`wp-includes/rest-api.php` |

Registers default REST API routes.

  |

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

| Version | Description | 
| [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%2Fclasses%2Fwp_rest_application_passwords_controller%2F__construct%2F)
before being able to contribute a note or feedback.