What is the meta field in the response of the user REST API?

Look into register_rest_field() to register meta with the rest api.

add_action( 'rest_api_init', 'adding_user_meta_rest' );

function adding_user_meta_rest() {
   register_rest_field( 'user',
                        'collapsed_widgets',
                         array(
                           'get_callback'      => 'user_meta_callback',
                           'update_callback'   => null,
                           'schema'            => null,
                            )
                      );
}

And then put your get_user_meta bit in the callback.

   function user_meta_callback( $user, $field_name, $request) {
       return get_user_meta( $user[ 'id' ], $field_name, true );
   }

The WP_REST_Meta_Fields class may provide more useful insight as well.

Answer copy from – Getting user meta data from WP REST API

tech