title: Integration of LinkedIn API in Django app
body: <p>I'm trying to get access token from Linkedin API using the python-linkedin package given at <strong><a href="https://github.com/ozgur/python-linkedin" rel="nofollow">https://github.com/ozgur/python-linkedin</a></strong> using following code </p>
  
  <pre><code>def get_linkedin_token(request):
  
      access_code = request.GET.get('code')
  
      if access_code is None:
      request.session['authentication'] = linkedin.LinkedInAuthentication(
                  LINKEDIN_CONSUMER_KEY,
                  LINKEDIN_CONSUMER_SECRET,
                  RETURN_URL,
                  linkedin.PERMISSIONS.enums.values())
      **url = request.session['authentication'].authorization_url**
          return HttpResponseRedirect(url)
  
      else:
          request.session['authentication'].authorization_code = access_code
          access_token = authentication.get_access_token()
          return HttpResponse(access_token)
  </code></pre>
  
  <p>the above code give me an Type error at <strong>url</strong> ' is not JSON serializable'; when I open the url in browser it works fine but in app its giving error described.
  what is going wwrong how can I fix it?
  thanks in advance</p>