title: How i can get the Bearer Token from HttpClient?
body: <p>I'm trying to send a POST request via HttpClient, but server response says "unauthorized" error. How I can get the Bearer Token? I searched for solutions but I don't understand it..</p>
  
  <p>That's my code and I don't know how I get the token for the request...</p>
  
  <pre><code>HttpPost request = new HttpPost("http://domain...");
  request.setHeader(HttpHeaders.ACCEPT, "application/json, text/plain, */*");
  request.setHeader(HttpHeaders.CONTENT_TYPE, "application/#json");
  request.setHeader(HttpHeaders.ACCEPT_LANGUAGE, "de,en-US;q=0.7,en;q=0.3");
  request.setHeader(HttpHeaders.ACCEPT_ENCODING, "gzip, deflate, br");
  request.setHeader(HttpHeaders.REFERER, "https://domain...");
  request.setHeader("DNT", "1");
  request.setHeader(HttpHeaders.HOST, "host..");
  String authToken = ""; // ... ?
  request.setHeader(HttpHeaders.AUTHORIZATION, "Bearer " + authToken);
  StringEntity params = new StringEntity("{}");
  params.setContentEncoding("UTF-8");
  request.setEntity(params);
  response = this.getHttpClient().execute(request);
  </code></pre>