Reputation: 13
After LinkedIn changed his API to v2 my users cannot login on my website anymore. The error message is
Multiple access token provided
With LinkedIn v1 API everything was good. For development purpose I added a second app in my LinkedIn account with a subdomain of the original domain. With the "subdomain"-app I received the error message that v1 is not supported anymore. The "original" domain app still worked with v1 until a couple of days ago. I adjusted the request to v2 and I received the error message "Multiple access token provided". I deleted the subdomain app, but the error still occurred.
With:
https://api.linkedin.com/v2/me?projection=(id,firstName,lastName,profilePicture(displayImage~:playableStreams))&format=json&access_token=xxxx
I receive:
"serviceErrorCode":100,"message":"Unpermitted fields present in PARAMETER: Data Processing Exception while processing fields [/access_token, /format]","status":403
I changed the access token name to oauth2_access_token
:
https://api.linkedin.com/v2/me?projection=(id,firstName,lastName,profilePicture(displayImage~:playableStreams))&format=json&oauth2_access_token=xxxxx
I receive:
serviceErrorCode":65603,"message":"Multiple access token provided","status":401
What do I have to do, to provide just one (the right) access token?
Upvotes: 1
Views: 563
Reputation: 584
Your access token needs to be included in the Authorization: Bearer {token}
header of your request. You do not need to append the format=json
query parameter as all API responses are returned in JSON format.
Upvotes: 1