Blog

Tips and Tricks: Fetching Secure URLs

By default, the Profile API returns URLs using HTTP. In some instances, you may prefer to have the URLs returned by the Profile API as secure. This can be accomplished easily by passing the secure-urls parameter and setting it's value to "true".

Request:

Response:

1
2
3
4
5
6
7
8
<person>
  <first-name>Kamyar</first-name>
  <last-name>Mohager</last-name>
  <headline>Senior Partner Engineer and Developer Advocate at LinkedIn</headline>
  <site-standard-profile-request>
    <url>https://www.linkedin.com/profile/view?id=8219502&amp;authType=name&amp;authToken=SqI1&amp;trk=api*a221108*s229076*</url>
  </site-standard-profile-request>
</person>

In the example response above, the profile URL is returned in secure format. To switch back to unsecure URLs, simply omit the secure-urls query parameter or set its value to "false".

-- Kamyar Mohager