8 – how to use httpclient for a GET request and that this request has a redirect?

I'm trying to use an API for a logout process, in the API documentation, specify an endpoint "https://example.com/logout", it's going to be used. is a GET request, I have to send a token, a state, and url_post_logout (for redirection).
I was logged in with a user account (and take the token and other settings), when I use the endpoint for disconnecting on POSTMAN by sending the token query settings, & # 39; status & # 39; and & # 39; url_post_logout & # 39 ;. displays status 200 and redirects to my home page or to the url_post_logout with closed session (works!).

But in my code, I try to do the same thing and show the error "Forbidden" 403 but close the session (it works almost).

                $ endpoint = "https://example.com/logout";
$ client =  Drupal :: httpClient ();
try{
$ response_logout = $ client-> get ($ endpoint, [
          'query' => [
            'url_post_logout' => $base_url,
            'token' => $_SESSION['token'],
& # 39; state & # 39; => & # 39; state123 & # 39 ;,],
])
} catch ( Exception e) {
$ error_binds = array (
& # 39;% error & # 39; => print_r ($ e-> getMessage (), TRUE)
)
$ error = t ((string) $ error_binds);
throws new  Exception ($ error, $ e-> getCode (), $ e);
}

Ideas or suggestions? Thank you.