Open harishksoft opened 3 years ago
Could you copy the error response? How are you authenticating?
I see you commented on the other issue. Could you turn of WP_DEBUG and so we know what the actual error is?
Could you copy the error response? How are you authenticating? @prionkor i'm testing the API using POSTMAN client and using basic authentication like username and password. i also tried woocommerce consumer key and secret, but not working. { "code": "unauthorized", "message": "Authentication Required", "data": { "code": 401, "message": "Authentication Required", "data": [] } } everytime i'm getting this error.
i have checked the code and saw that public static function check_auth( $request ){
if( is_user_logged_in() ) {
return true;
}
return new \WP_Error('unauthorized', 'Authentication Required', [
'code' => 401,
'message' => 'Authentication Required',
'data' => [],
]);
}
using this function to authenticate user, but don't know this will work when called from REST
the endpoints /wishlist/v1 its getting responses with supporting endpoints.but actual required apis are not working
Hello @prionkor I have face same issue as mention in above response of @harishksoft .
as used is_user_logged_in() in check_auth($request) function how can API check in case of POSTMAN or real-time route?
Anyone guy's ..............................
when try to authenticate using user credential, its not working and the /wishlists endpoint return error response