title: Not able to get the encrypted password using JFrog Artifactory REST API.
body: <p>I have written a Java client for calling jfrog api (<a href="https://artifactory.abcdcompany.com/artifactory/api/security/encryptedPassword" rel="nofollow noreferrer">https://artifactory.abcdcompany.com/artifactory/api/security/encryptedPassword</a>), which can provide the encrypted password.</p>
  
  <p>Option 1: </p>
  
  <p>Process followed for using Basic authentication using username and API Key as below. </p>
  
  <ol>
  <li>Created a inputString = "UserName:APIKey"</li>
  <li>We created a encodedString =  Base64.getEncoder.encodeToString(inputString). </li>
  <li>Created a new String as stringToBeSent = "Basic " + encodedString;</li>
  <li>We then set the header as Request.setHeader(HTTPHeaders.Authoirization,stringToBeSent);</li>
  </ol>
  
  <p>I am able to connect to the resource and getting a HTTP Status 200. Also, I am getting a response, but in the response, instead of getting the encrypted password, I am receiving the same API Key that I have used in the step 1 above. </p>
  
  <p>Option 2: 
  Also, we have tried using the following: 
  request.setHeader("X-JFrog-Art-Api", "APIKey"); But no avail. I am receiving the same API Key that am sending. </p>
  
  <p>Should anything be enabled on the serverside to make artifactory respond back with the encrypted password, when called through an API.</p>