Search code examples
grailsoauthoauth-2.0linkedin-api

Get Recommendation from LinkedIn API returns empty map [:] as response


I have created a web application from which I am trying to get recommendations of a user from his/her LinkedIn Profile using URL

String url="https://api.linkedin.com/v1/people/~:(recommendations-received:(id,recommendation-type,recommendation-text,recommender))?format=json"

When I am using this URL in the Api Explorer it works fine. And gives output:-

{   "recommendationsReceived":  {
    "_total": 2,
    "values":  [
       {
        "id": 558598601,
        "recommendationText": "xxx is among the best team players I ever worked with.  He has handled client effectively with smooth operations. I had always seen him as person with solution mindset and always look for  solution rather than thinking about the problem. ",
        "recommendationType":  {
          "code": "colleague"
        },
        "recommender":  {
          "firstName": "XXX",
          "id": "YYYY",
          "lastName": "XXX"
        }
      },
       {
        "id": ZZZZ,
        "recommendationText": "XXX is one of the most dedicated person at work.I always him with a flexible attitude and ready to adapt himself in all situation.I have seen him work all night to catch up all the deadlines and deliver on time ."
        "recommendationType":  {
          "code": "colleague"
        },
        "recommender":  {
          "firstName": "XXX",
          "id": "YYYY",
          "lastName": "XXXX"
        }
      }
    ]   } }

The problem comes, when I am using this URL in my Developer app.It doesn't give any error just simple return an empty map [:] as output in response

Irrespective of these recommendation fields, I successfully get the user basic profile data such as email, id, image,firstName,lastName.Means my code is working for other fields well but not for these recommendation fields*

To find the solution, I did some internet surfing and find a link of Linked API docs

Linked API Docs

As per Docs following selection of profile fields are only available to applications that have applied and been approved for the Apply with LinkedIn program: Recommendation Fields

I already created a LinkedIn Developer account to get key & Secret So how do I apply and get approval for Apply with LinkedIn Recommendation Fields. I already have seen the LinkedIn support but can't find the way to ask question to the Linked Developer help support

Please suggest me the right way.


Solution

  • After a long internet surfing,I have found something fruitful that, I have to fill up a form to get these fields.Here is the form

    along with its procedural details