add_action( ‘init’, function() {
register_post_meta( ‘post’, ‘example_post_meta’, [
‘show_in_rest’ => true,
‘single’ => true,
‘type’ => ‘string’,
‘auth_callback’ => function() {
return true;
}
] );
} );
You need just return true for “auth_callback” function. That’s it!