Linkedin OAuth2 authorization code error

后端 未结 3 1835
时光说笑
时光说笑 2021-01-21 11:53

I´m trying to connect via Linkedin Auth2 from a java web application:

  1. Added my own app in linkedin.
  2. Generate the authorization URL: https://www.linkedin.c
3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-21 12:34

    I too got bugged with this issue for long time. Please keep few things in mind which I did and eventually sorted it out.

    1. Hit the api to get authorization code by using get request.
    2. The authorization code has a life span of about 20 seconds, so its difficult to manually copy the code from the url and make a request for token access. You should do it pro-grammatically.
    3. Make a post request for getting access token.
    4. Most Important: Old linkedin applications that I had created was not working and giving the above error. Create a new linkedin application and try. Doing this worked for me.

    I assume that all the other parameters like client_id, secret, redirect_uri are correct.

    please try and let us know.

    Thanks.

提交回复
热议问题