{"id":3500,"date":"2014-03-27T04:51:23","date_gmt":"2014-03-27T04:51:23","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/27\/using-linkedin-oauth2-0-with-rauth-collection-of-common-programming-errors\/"},"modified":"2014-03-27T04:51:23","modified_gmt":"2014-03-27T04:51:23","slug":"using-linkedin-oauth2-0-with-rauth-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/27\/using-linkedin-oauth2-0-with-rauth-collection-of-common-programming-errors\/","title":{"rendered":"Using LinkedIn oauth2.0 with rauth-Collection of common programming errors"},"content":{"rendered":"<p>I am trying to connect to LinkedIn using the OAuth2Service provided by rauth. I successfully retrieve the access token. To do so, I configured a specific decoder for the json response.<\/p>\n<pre><code>json_decoder = json.loads\nparams = {'decoder': json_decoder}\nsession = linkedin.get_auth_session(data=data, **params)\n<\/code><\/pre>\n<p>But when doing the API call via <code>r = session.get('people\/~', data={\"x-li-format\":'json'},)<\/code> the following response is coming back:<\/p>\n<pre><code>\n\n  401\n  1369334215190\n  F3SKIP4YUF\n  0\n  Unknown authorization header {Bearer AQU2HxhdXVHGG4sIWdZV7siahjVyTz0KIigEVvtMpAh...}\n\n\n<\/code><\/pre>\n<p>Is it possible that LinkedIn does not support the bearer token? If so, does rauth support other schemes?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I am trying to connect to LinkedIn using the OAuth2Service provided by rauth. I successfully retrieve the access token. To do so, I configured a specific decoder for the json response. json_decoder = json.loads params = {&#8216;decoder&#8217;: json_decoder} session = linkedin.get_auth_session(data=data, **params) But when doing the API call via r = session.get(&#8216;people\/~&#8217;, data={&#8220;x-li-format&#8221;:&#8217;json&#8217;},) the following [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3500","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3500","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=3500"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3500\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=3500"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=3500"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=3500"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}