Forums Register Login

HTTPS Rest Call using Jersey 2.4 to LinkedIn Rest Service API

+Pie Number of slices to send: Send
I have been trying to make a Java Rest Program that can read JSON from the LinkedIn Rest Service API. The LinkedIn Rest Service API uses HTTPS. I have used Firefox to obtain the LinkedIn HTTPS Cert as a .pem file, and imported it into a file call .keystore. I use Jersey's Client API to call the service passing it that same .keystore file. Despite all this I am still getting the same HTTP 401 Unauthorized Exception. I have very little experience when dealing with keystores, truststores, and https call, I would appreciate any help. I have posted relevant the code below. Is there anything I need to change?, Is anyone familiar with the SslConfigurator class of JAX-RS 2.4? Or the LinkedIn Rest Service API. I have tested the LinkedIn Rest API on Postman with an active access token and had no issues.


+Pie Number of slices to send: Send
Please BeForthrightWhenCrossPostingToOtherSites (Cross posted).

Did you try the proper initialization of SslConfigurator as described in the documentation?
+Pie Number of slices to send: Send
My bad on the cross-posting (never really understood why it is a problem). That was the first thing I did, and I believe I have configured it according to the doc. I have followed all the proper procedures for importing the CA to the trustStore, and having SSLConfigurator read that. This is a new api, so I may just have to wait for better documentation, or for tutorials online.
A day job? In an office? My worst nightmare! Comfort me tiny ad!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 3010 times.
Similar Threads
Two-way SSL authentication
REST client to get link URI's "dynamically" via rel="" values.
regarding cacerts from JAVA_HOME\jre\lib\security
HTML/Post java.lang.classcastexception
CertificateException: No name matching <hostname> found.
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 06:37:48.