ebx-linkedin-sdk
ebx-linkedin-sdk copied to clipboard
obtainUserAccessToken fails with HTTP 411
Hello, I'm trying to obtain the user access token with:
LinkedInClient client = new DefaultLinkedInClient(Version.DEFAULT_VERSION);
LinkedInClient.AccessToken newAccessToken = client.obtainUserAccessToken(clientId, clientSecret, redirectURI, code);
But fails with:
Caused by: com.echobox.api.linkedin.exception.LinkedInNetworkException: A network error occurred while trying to communicate with LinkedIn: LinkedIn request failed(HTTP status code 411)
at com.echobox.api.linkedin.client.DefaultLinkedInClient.makeRequestAndProcessResponse(DefaultLinkedInClient.java:716) ~[ebx-linkedin-sdk-8.0.0.jar:na]
at com.echobox.api.linkedin.client.DefaultLinkedInClient.makeRequestFull(DefaultLinkedInClient.java:581) ~[ebx-linkedin-sdk-8.0.0.jar:na]
at com.echobox.api.linkedin.client.DefaultLinkedInClient.obtainUserAccessToken(DefaultLinkedInClient.java:420) ~[ebx-linkedin-sdk-8.0.0.jar:na]
It seems the client doesn't set Content-Length; is there something I may be missing here?
Thanks!