0
votes

I have a web application and it can successfully obtain access tokens from LinkedIn's API with the token's length equals to 350 characters, but when I am using the obtained access token to request data from LinkedIn, LinkedIn API now throws me an error like this:

Access Token is too long (maximum is 255 characters)

The web application has been working well for many years and this error only happens recently, is there any change LinkedIn made that I am not aware of?

1
I figured it out myself: LinkedIn is now returning access tokens longer than 255 characters, while few years ago it was less than 255 characters. That "Access Token is too long" error was actually threw by my model as a filed data verification. --- this is what happens when you are looking into your codes from 6 years go! - Yang He

1 Answers

0
votes

Are you sending the access token in a URL parameter or in a header? I believe there is no length restriction if it's in a header.

See Step 4 here: https://developer.linkedin.com/docs/oauth2

The header will be: Authorization: Bearer your_access_token