Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTPS GET "javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated" while using typeform response API #28

Open
yireh opened this issue Jan 14, 2019 · 2 comments

Comments

@yireh
Copy link

yireh commented Jan 14, 2019

When I tried

import http.requests.*;

public void setup() 
{
	size(400,400);
	smooth();
	
  GetRequest get = new GetRequest("https://api.typeform.com/forms/DxlTiK/responses");
   get.addHeader("Authorization", "Bearer {MyTokenCode}");
  
  get.send(); // program will wait untill the request is completed
  println("response: " + get.getContent());

  JSONObject response = parseJSONObject(get.getContent());
  println("status: " + response.getString("status"));
  JSONArray boxes = response.getJSONArray("data");

}

I get following error message:

javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
response: null
at sun.security.ssl.SSLSessionImpl.getPeerCertificates(SSLSessionImpl.java:397)
at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:128)
at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:397)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:148)
at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:149)
at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:121)
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:573)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:425)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:732)
at http.requests.GetRequest.send(Unknown Source)
at sketch_20190114_Song_for_Film_.setup(sketch_20190114_Song_for_Film_.java:30)
at processing.core.PApplet.handleDraw(PApplet.java:2361)
at processing.core.PGraphicsJava2D.requestDraw(PGraphicsJava2D.java:240)
at processing.core.PApplet.run(PApplet.java:2256)
at java.lang.Thread.run(Thread.java:745)

@yireh yireh changed the title HTTPS GET "javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated" while using typeform API HTTPS GET "javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated" while using typeform response API Jan 14, 2019
@Mattheex
Copy link

Same thing, someone has a issue please ?

@yireh
Copy link
Author

yireh commented Jan 18, 2019

Actually I got a solution later with using Processing 3 instead of Processing 2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants