• asanchezm

    (@asanchezm)


    I’m having trouble with some urls that I’m trying to whitelist.

    But I don’t understand why some work and others don’t … and said

    {
    “code”: “api_bearer_auth_not_logged_in”,
    “message”: “You are not logged in.”,
    “data”: {
    “status”: 401
    }
    }

    For example:

    `switch ($request_method) {
    case ‘GET’:
    $custom_urls[] = ‘/wp-json/wp/v2/comercios/?’; OK
    break;
    case ‘GET’:
    $custom_urls[] = ‘/wp-json/wp/v2/catcomercios/?’; OK
    break;
    case ‘GET’:
    $custom_urls[] = ‘/wp-json/wp/v2/restaurante/?’; OK
    break;
    case ‘GET’:
    $custom_urls[] = ‘/wp-json/wp/v2/bonos/?’; OK
    break;
    case ‘GET’:
    $custom_urls[] = ‘/wp-json/bono/v1/?’; OK
    break;
    case ‘GET’:
    $custom_urls[] = ‘/wp-json/wp/v2/servicios/?’;OK
    break;
    case ‘GET’:
    $custom_urls[] = ‘/wp-json/wp/v2/promociones/?’; OK
    break;
    case ‘GET’:
    $custom_urls[] = ‘/wp-json/wp/v2/productos/?’; OK
    break;
    case ‘GET’:
    $custom_urls[] = ‘/wp-json/wp/v2/posts/?’; OK
    break;
    case ‘GET’:
    $custom_urls[] = ‘/wp-json/wp/v2/zonas/?’; OK
    break;
    case ‘GET’:
    $custom_urls[] = ‘/wp-json/wp/v1/users/password/?’; ERROR
    break;
    case ‘GET’:
    $custom_urls[] = ‘/wp-json/wp/v1/users/register/?’; ERROR
    break;
    case ‘GET’:
    $custom_urls[] = ‘/wp-json/wp/v2/campana_bonos/?’; ERROR
    break;
    case ‘GET’:
    $custom_urls[] = ‘/wp-json/wp/v2/campana_bonos/?per_page=100’; ERROR
    break;
    case ‘POST’:
    $custom_urls[] = ‘/wp-json/wp/v1/users/password/’; ERROR
    break;
    case ‘POST’:
    $custom_urls[] = ‘/wp-json/wp/v1/users/register/’; ERROR
    break;
    case ‘GET’:
    $custom_urls[] = ‘https://lasrozasmarket.es/wp-json/bono/v1/userid/?/campana/?’; ERROR
    break;
    }

    Could you help me?
    thanks

  • The topic ‘Error in whitelist’ is closed to new replies.