Validate My Custom Endpoint with Bearer Token and User Authentication
-
Hello Support,
I hope you’re having a great day! My question is: I have this really good plugin, but I’m facing an issue with my custom
register_rest_route
endpoint. I’m unable to validate the token along with the user. My requirement is to verify the token along with the user, and only if they match, my customregister_rest_route
endpoint should validate and proceed to the next step.
Here is an example forregister_rest_route
register_rest_route('api/v1', '/user_info', array(
'methods' => 'POST',
'callback' => 'user_info',
'permission_callback' => '__return_true'
));Can you please help me with this? ??
Thank you in advance!
- You must be logged in to reply to this topic.