Recognize logged WP user in existing REST API

You can recognize a user by passing user-id

Example:

https://example.com/wp-json/wp/v2/posts?author=1

This author parameter will recognize author posts and return those

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)