How can we improve


How do i access your api using postman or from my java based application; would you share any example i can use to access the api from my web based application. I tried few times and always opens an authentication page and though i enter my username and password it fails.

7 votes
Sign in
Password icon
Signed in as (Sign out)
You have left! (?) (thinking…)
Francis shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →


Sign in
Password icon
Signed in as (Sign out)
  • Jefferson Bien-Aime commented  ·   ·  Flag as inappropriate

    Hi Francis, I hope it is not too late. This is the example in Java. Like David said, I left the password blank and put the token in the username. I hope this work.


    import org.apache.commons.codec.binary.Base64;


    * @author jeffersonbienaime
    public class BibleSearchQuery {

    * @param args the command line arguments
    * @throws java.lang.Exception
    public static void main(String[] args) throws Exception {

    BibleSearchQuery http = new BibleSearchQuery();

    System.out.println("Testing 1 - Send Http GET request");


    private void sendGet() throws Exception {

    String url = "";

    URL obj = new URL(url);
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    String username = "your token";
    String password = "";
    String user_pass = username + ":" + password;
    String encoded = Base64.encodeBase64String(user_pass.getBytes());
    con.setRequestProperty("Authorization", "Basic " + encoded);

    // optional default is GET
    System.out.println("\nSending 'GET' request to URL : " + url);
    System.out.println("Response Code : " + con.getResponseCode());
    System.out.println("Response Message : " + con.getResponseMessage());

    BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();

    while ((inputLine = in.readLine()) != null) {

    //print result



  • Lucas Harskamp commented  ·   ·  Flag as inappropriate

    I FOUND IT I FINALLY FOUND IT! It's C# HttpWebRequest, but conversion to Java should be easy.

    At startup:

    ServicePointManager.ServerCertificateValidationCallback += (sender, certificate, chain, sslPolicyErrors) => { return true; };

    at request:

    HttpWebRequest request = (HttpWebRequest)WebRequest.Create("");
    request.UseDefaultCredentials = false;
    request.Credentials = new NetworkCredential("{TOKEN}","X");
    request.Method = WebRequestMethods.Http.Get;
    request.AllowAutoRedirect = true;
    HttpWebResponse response = (HttpWebResponse)request.GetResponse();
    using (StreamReader streamReader = new StreamReader(response.GetResponseStream()))
    Debug.Log(string.Format("Code: {0}\nDesc: {1}\nType: {2}\nLength: {3}\nEncoding: {4}\nContent: {5}", response.StatusCode, response.StatusDescription, response.ContentType, response.ContentLength, response.ContentEncoding, streamReader.ReadToEnd()));

  • David Leach commented  ·   ·  Flag as inappropriate

    Hi Francis. I'm not a Java developer, but hopefully I can help you get started using the API. First, if you haven't checked out the API documentation you can find it here:

    You'll need to create an application within your account in order to get an API key. You can do that here:

    Once you've created the application you'll see the API key. That's what you'll use instead of a username/password to make API requests.

    Now, open postman and you'll want to make a GET request. Using the example from the API documentation, let's set the URL to

    In the Authorization tab of Postman (just under the URL) choose type "Basic Auth" and paste your API Key in for the username. Leave the password blank (actually you can put anything you want, the API ignores it). Click 'Update Request' to add the Authorization header to the request.

    When you click 'Send' you should see the response.

    Hope that helps!

Feedback and Knowledge Base