I'm trying to get **the connections in linkedIn using their API**, but when I try to retrieve the connections I get a 401 unauthorized error.

in the official documentation says 

> 
> You must use an access token to make an [authenticated call](http://developer.linkedin.com/documents/authentication) on behalf
>  of a user 
> 
> 
> **Make the API calls** You can now use this access\_token to make API calls on behalf of this user by appending
>  "oauth2\_access\_token=access\_token" at the end of the API call that you
>  wish to make.
> 
> 
> 

The API call that I'm trying to do is the following

Error -->
<http://api.linkedin.com/v1/people/~/connections:(id,headline,first-name,last-name)?format=json&oauth2_access_token=>**access\_token**

I have tried to do it with the following endpoint without any problems.

OK --> <https://api.linkedin.com/v1/people/~:(id,first-name,last-name,formatted-name,date-of-birth,industry,email-address,location,headline,picture-urls::(original))?format=json&oauth2_access_token=>**access\_token** 

this list of endpoints for the connections API are described here
<http://developer.linkedin.com/documents/connections-api>
I just copied and pasted one endpoint from there, so the question is what's the problem with the endpoint for getting the connections? what am I missing?

EDIT:
for the preAuth Url I'm using

<https://www.linkedin.com/uas/oauth2/authorization?response_type=code&client_id=>**ConsumerKey**&scope=**r\_fullprofile%20r\_emailaddress%20r\_network&state**&state=**NewGuid**&redirect\_uri=**Encoded\_Url**

<https://www.linkedin.com/uas/oauth2/accessToken?grant_type=authorization_code&code=>**QueryString\_Code**&redirect\_uri=**EncodedCallback**&client\_id=**ConsummerKey**&client\_secret=**ConsumerSecret**

please find attached the login screen requesting the permissions

![enter image description here](https://i.stack.imgur.com/4iqAo.png)

EDIT2:
Switched to https and worked like a charm!